PHP code example of kirschbaum-development / laravel-route-file-macro

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

    

kirschbaum-development / laravel-route-file-macro example snippets


Route::file(base_path('routes/admin/users.php'));

$files = File::files(__DIR__.'/routes');
Route::files($files[0]);

Route::files([
    base_path('routes/admin/posts.php'),
    base_path('routes/admin/users.php')
]);

$files = File::files(__DIR__.'/routes');
Route::files($files);