承接 masticore/laravel-url-matcher-command 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

masticore/laravel-url-matcher-command

Composer 安装命令:

composer require masticore/laravel-url-matcher-command

包简介

A command to get information about the route matched against an arbitrary url string

README 文档

README

Motivation

This command was created to fill the need of a way to find out which route definition will match any given url and method, this is most useful in big apps with a lot of routes where debugging this can be cumbersome.

It was inspired by symfony's bin/console router:match command.

Install

Require this package using composer, it is recommended to install it as a development dependency.

composer require masticore/laravel-url-matcher-command --dev

Laravel's auto discovery will automatically register the command into artisan console

Usage

Given a URL and an http method, the command will search all the registered routes for a match and show all relevant information (uri, name, handler, middlweare and others)

~$ php artisan route:match api/product/3/ get
+---------------------+---------------------------------------------+
| Property            | Value                                       |
+---------------------+---------------------------------------------+
| Uri                 | api/product/{product}                       |
| Prefix              | api                                         |
| Methods             | GET, HEAD                                   |
| Controller          | App\Http\Controllers\ProductController@show |
| Middleware          | api                                         |
| Namespace           | App\Http\Controllers                        |
| Parameter Names     | product                                     |
| Parameters          | 123                                         |
| Original Parameters |                                             |
| Binding Fields      |                                             |
| Is Fallback         | false                                       |
| Where               |                                             |
+---------------------+---------------------------------------------+

TODO

  • Unit tests
  • Handle more use cases like route names, groups, subdomains, bindings
  • support laravel versions older than 7.X
  • support php versions other than 7.3 & 7.4

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2020-06-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固