I’m new to using laravel 5.7.
I made a make:auth and to authenticate I need use http://localhost:8000/login and when I login I get redirected to http://localhost:8000/home, but I want login on http://localhost:8000/admin-panel/login and when I auth, I have to redirect to http://localhost:8000/admin-panel/home
Which files I will have to edit?
routes/web.php:
Route::get('/', function () { return view('welcome'); }); Auth::routes(['register' => false]); Route::get('/home', 'HomeController@index')->name('home');
Advertisement
Answer
routes/web.php
Route::group(['prefix' => 'admin-panel'], function(){ Route::get('/', function () { return view('welcome'); }); Auth::routes(['register' => false]); Route::get('/home', 'HomeController@index')->name('home'); });
to see all your routes put this in the command line at your project root
php artisan route:list