mercredi 1 février 2017

Laravel 5 get compiled Blade & JS view output

I have a view that outputs a string calculated by the view's Blade and some JavaScript.

I would like to know if there is a way to return this output to a variable in my controller? Much like the following in my controller:

$contents = view('pages.view', ['one' => 1, 'two' => 2, 'three' => 3])->render();
dd($contents);

Except render() returns the HTML and I want the compiled output.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire