how to get view html code in laravel 6 code example Example: laravel load view in variable $html = view('users.edit', compact('user'))->render();