Home > Blockchain >  laravel problem with bootstrap cache generate routes-v7
laravel problem with bootstrap cache generate routes-v7

Time:11-03

Im new to laravel, I bought dashboard, I have problem that the routes are not read from routes->web but instead there is many routes including update and install, I want to use this dashboard but don't know how to ignore these routes and use the normal route sorry if my question is weird i need a help in this,I found in the bootstrap folder->cache->routes-v7.php file which includes many codes I think maybe the issue is coming from this file, I want to know what is this package and how to delete it

enter image description here

enter image description here

  app('router')->setCompiledRoutes(
      array (
    'compiled' => 
    array (
      0 => false,
      1 => 
      array (
        '/_debugbar/open' => 
        array (
          0 => 
          array (
            0 => 
            array (
              '_route' => 'debugbar.openhandler',
            ),
            1 => NULL,
            2 => 
            array (
              'GET' => 0,
              'HEAD' => 1,
            ),
            3 => NULL,
            4 => false,
            5 => false,
            6 => NULL,
          ),
        ),
        '/_debugbar/assets/stylesheets' => 
        array (
          0 => 
          array (
            0 => 
            array (
              '_route' => 'debugbar.assets.css',
            ),
            1 => NULL,
            2 => 
            array (
              'GET' => 0,
              'HEAD' => 1,
            ),
            3 => NULL,
            4 => false,
            5 => false,
            6 => NULL,
          ),
        ),

CodePudding user response:

Your route has been cached. If you need to remove route caching you can use the command :

php artisan route:clear

You can cache your route again by :

php artisan route:cache

routes-v7.php is a file that is automatically generated when you cache routes.


Updates

This is Laravel which has a custom route, so the web.php file is not used.

To register a route file, you need to register it in app\Providers\RouteServiceProvider.php :

public function boot()
{
    ...

    $this->routes(function () {
        Route::prefix('api')
            ->middleware('api')
            ->namespace($this->namespace)
            ->group(base_path('routes/api.php'));

        Route::middleware('web')
            ->namespace($this->namespace)
            ->group(base_path('routes/web.php')); // Or custom route
    });

    ...
}
  • Related