PHP code example of n7olkachev / laravel-route-helpers

1. Go to this page and download the library: Download n7olkachev/laravel-route-helpers 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/ */

    

n7olkachev / laravel-route-helpers example snippets


// routes.php

\Route::group(['prefix' => '/admin', 'as' => 'admin.'], function () {
    \Route::get('/')->name('home');
    \Route::group(['prefix' => '/users', 'as' => 'users.'], function () {
        \Route::get('/{user}')->name('show');
    });
});

admin_home_url();
admin_users_show_url(['user' => $user->id]);
bash
php artisan route:helpers
json
// composer.json
...
"autoload": {
    "files": [
        "storage/route-helpers/cache.php"
    ],
}
...