Scanning routes

The next step is extremely important. The Laravel application must process the annotations. For this chore, Artisan is used to scan the routes.

The following command is used to scan the routes. The output will be Routes scanned! as shown here:

$ php artisan route:scan

Routes scanned!

The results of this scan will produce a file named routes.scanned.php in the storage/framework directory.

The following code writes to storage/framework/routes.scanned.php file:

$router->get('search-accommodation', [
  'uses' => 'MyCompanyHttpControllersAccommodationsController@search',
  'as' => NULL,
  'middleware' => [],
  'where' => [],
  'domain' => NULL,
]);

Note

Note that the storage/framework/routes.scanned.php file does not need to be put into source code control as it is generated.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset