0
I wonder if there is any way to save the return of a view on Laravel in a string
.
Usually we return to view
to "print" the result of an action on the page:
function getIndex() {
return view('hello');
}
I tried to save in a variable, but it’s returning Illuminate\View\View(Object)
when I execute a var_dump
.
Example of what I have so far:
$view = view('hello');
var_dump($view); // retorna Object
Is there any way to assign to string
of view
to a variable?