Put auth folder in subfolder (Laravel)

0

I'm new to Laravel and in my project I want to put the auth view folder inside the admin folder, so:

C:\xampp\htdocs\projeto\resources\views\admin\auth\

However, I know I should still edit something else in the Laravel files so that the new auth path is found, but I do not know what to change.

Version: Laravel Framework 5.4.36

    
asked by anonymous 05.02.2018 / 16:23

1 answer

0

On your terminal using php artisan route:list you will be able to see all the routes related to Laravel authentication.

Changing the views directory you should also change all the calls that were made to them. In each controller that is in the App\Http\Controllers\Auth folder, a call is made to each of the views of the auth folder.

To change the calls, I see no other way than to override the methods that call these views.

If you do not understand, take a look at here

I forgot to mention that calls are usually made in traits that are included with Laravel itself and are stored in the vendor folder. You should never modify codes directly in the vendor folder, so I've talked about and overwritten the methods.

    
07.02.2018 / 12:27