skip to Main Content

When I run php artisan route:list in my Laravel project, I see several routes that I did not define in my routes/web.php file. These additional routes seem to be related to Laravel Dusk, Sanctum, and storage.

I need to list the routes which are defined in the routes/web.php

GET|HEAD       _dusk/login/{userId}/{guard?}           dusk.login › LaravelDuskControllers...
GET|HEAD       _dusk/logout/{guard?}                  dusk.logout › LaravelDuskControllers...
GET|HEAD       _dusk/user/{guard?}                    dusk.user › LaravelDuskControllers...
GET|HEAD       email-verification/check/{token}        email-verification.check › ...
GET|HEAD       email-verification/error                email-verification.error › AuthRegisterController@...
GET|HEAD       sanctum/csrf-cookie                     sanctum.csrf-cookie › LaravelSanctumHttpControllers...
GET|HEAD       storage/{path}                          ................................ storage.local

Checked routes/web.php: verified that none of these routes are defined here.

2

Answers


  1. Since you have added a Starter Kits, named breeze, you can remove it by:

    composer remove laravel/breeze

    Since removing from the vendor don’t remove the workspace, you need to remove them manually, check the files to remove here.

    Login or Signup to reply.
  2. if you want to check all routes defined by you . you can filter it out by middleware
    
    i have shared the command  try this and check 
    
    php artisan route:list --middleware=web
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search