laravel check auth on specific function on controller code example Example: laravel authentication composer require laravel/ui php artisan ui vue --auth