lkh / route-list
The purpose of this composer is to easier manage all routes.
v1.0.6
2023-04-10 19:39 UTC
Requires
- php: >=5.6.4
- laravel/framework: 5.*|6.*|7.*|8.*|^9.0|^10.0
- yajra/laravel-datatables-oracle: ^7.0|^8.0|^9.0
README
這個專案主要目標是想讓route的管理更加輕鬆
The purpose of this project is to easier manage all routes.
Installation(安裝)
使用下列指令安裝
To install through Composer, by run the following command:
composer require lkh/route-list --dev
已下指令可以將config的設定移至專案內管理
The package will automatically register a service provider and alias.
Optionally, publish the package's configuration and publish stubs by running:
php artisan vendor:publish --provider="Lkh\RouteList\RouteListServiceProvider"
result(執行結果)
Copied File [/vendor/lkh/route-list/src/config/config.php] To [/config/routelist.php] Publishing complete.
start use it(開始使用)
創建所需DB table 以及 載入config
Create db table & load config
php artisan migrate
php artisan config:ca
執行routelist command
Run command
php artisan route:get-route-list
go to url : /route-view
config setting (config 設定)
return [
/**
* The routes to hide with regular expression.
*/
'filter_regular' => [
'#^_debugbar#',
'#^_ignition#',
'#^routes$#'
],
/**
* The columns array can help you to change which columns do you want to show for datatable.
*/
'columns' => [
'methods' => ['title' => 'Method'],
'domain' => ['title' => 'Domain'],
'path' => ['title' => 'Path'],
'name' => ['title' => 'Name'],
'action' => ['title' => 'Action'],
'middleware' => ['title' => 'Middleware'],
],
/**
* The pageLengthOptions array can help you to setting showing item for datatable.
*/
'pageLengthOptions' => [
[10, 25, 50, -1],
[10, 25, 50, "All"]
],
/**
* choose column to sort.
* array > 0,1,2,3,4,5
* asc >> 1,2,3,4
* desc >> 4,3,2,1
*/
'tableOrder' => [1, 'asc'],
];
problem solution(常見問題解決方案)
- composer version
如果你的composer版本是version,你可能會遇到版本問題.
if you use composer version 1, maybe you will see this problem.
Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/ deprecating-composer-1-support/ Info from https://repo.packagist.org: #StandWithUkraine
你可以藉由以下指令調整composer的版本。
you can use this command to change composer version to fix this problem.
composer self-update --2