Home > database >  How to change the default landing page after serve command
How to change the default landing page after serve command

Time:12-12

I am wondering if it is possible to change the default startup address after the command

php artisan serve

Because when I run it, I get the default url

Starting Laravel development server: http://127.0.0.1:8000

But my "first page" is when I type

 http://127.0.0.1:8000/index 

in the browser.

So is it possible to automatically give out http://127.0.0.1:8000/index after startup?

CodePudding user response:

If you want to show your index.blade.php at first place then just replace in your routes/web.php

From this

Route::get('/', function () {
   return view('welcome');
});

TO this

Route::get('/', function () {
    return view('index');
});
  • Related