PHP code example of lartrix / thinkphp-route-priority

1. Go to this page and download the library: Download lartrix/thinkphp-route-priority 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/ */

    

lartrix / thinkphp-route-priority example snippets




return [
    'route' => \Lartrix\ThinkPHPRoutePriority\Route::class,
    \think\Route::class => \Lartrix\ThinkPHPRoutePriority\Route::class,
];

use think\facade\Route;

Route::get('/path/<id>', 'index/read');
Route::get('/path/you', 'index/you');
Route::get('/path', 'index/path');
json
{
    "scripts": {
        "post-autoload-dump": [
            "@php think service:discover"
        ]
    }
}