laravel controller view function using authentication code example Example: laravel authentication composer require laravel/ui php artisan ui vue --auth