laravel use resource in views code example
Example 1: laravel load view in variable
$html = view('users.edit', compact('user'))->render();
Example 2: use resource in laravel 8
php artisan make:controller PhotoController --resource --model=Photo
$html = view('users.edit', compact('user'))->render();
php artisan make:controller PhotoController --resource --model=Photo