laravel load view in variable
snippet in php

laravel load view in variable

user939

$html = view('users.edit', compact('user'))->render();

pass parameter to view laravel

user7631

Route::get('/', function () {
    return view('greeting', ['name' => 'James']);
});

laravel return view in web.php

user9903

Route::get("/page", function(){
   return View::make("dir.page");
});