change default route laravel

set route name laravel

Route::get('/novanoticia', 'HomeController@getNovaNoticia')->name('route_name');
Route::get('/novanoticia', ['as' => 'route_name', 'uses' => 'HomeController@getNovaNoticia']);

change default route laravel

Laravel v9
  After your login, you will beeing redirect to the homepage but you can
 change that in RouteServiceProvider

  //public const HOME = '/home';
  public const HOME = '/hello';

If you wanna change the default page , what do you have to do is:

Route::get('/', function () {
    return redirect('/login');

Leave a Comment