定制 lkh/route-list 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lkh/route-list

最新稳定版本:v1.0.6

Composer 安装命令:

composer require lkh/route-list

包简介

The purpose of this composer is to easier manage all routes.

README 文档

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(常見問題解決方案)

  1. 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

hope you enjoy :)

统计信息

  • 总下载量: 12
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-04-09