Place auth folder in subfolder (Laravel)

Asked

Viewed 493 times

0

I’m new in Laravel and in my project I want to put the auth view folder inside the admin folder, getting like this:

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

However, I know I must still edit something else in the Laravel files for the new auth path to be found, but I don’t know what I should change.

Version: Laravel Framework 5.4.36

  • Take a look here httpss://stackoverflow.com/q/40110160/4623423

1 answer

0

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

By changing the views directory you should also change all the calls that have been made to them. In each controller that is in the folder App\Http\Controllers\Auth a call is made for each view in the auth folder.

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

If you don’t understand, take a look 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 code directly in the vendor folder, so I spoke and overwrite the methods.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.