PHP code example of dragon-code / laravel-route-names
1. Go to this page and download the library: Download dragon-code/laravel-route-names library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dragon-code / laravel-route-names example snippets
app('router')
->get('pages', [IndexController::class, 'index'])
->name('my_pages');
return route('my_pages');
// \Symfony\Component\Routing\Exception\RouteNotFoundException
// Route [my_pages] not defined.
return route('pages.index');
// Returns the result of executing the `IndexController@index` method.