Commit 0015b1d
Tortue Torche
The Controller::render() method can now renders inline text.
E.G. rendering inline javascript inside a controller action:
public function create() {
$message = new App\Message;
$formId = form_id($message);
$html = json_encode(render_view("messages.form", compact('message')));
$this->render(['js' => "MessagesView.create('$formId', $html)"]);
}1 parent a843738 commit 0015b1d
1 file changed
+9
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
26 | 31 | | |
27 | 32 | | |
28 | 33 | | |
29 | | - | |
| 34 | + | |
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
| |||
0 commit comments