laravel 5 pass variable to view if exists code example Example: laravel load view in variable $html = view('users.edit', compact('user'))->render();