定制 clarence/laravel-default-routes 二次开发

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

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

clarence/laravel-default-routes

Composer 安装命令:

composer require clarence/laravel-default-routes

包简介

Default routes for laravel

README 文档

README

build status

With this library, you can easily add "module/controller/action" style routes for Laravel.

Install

Suggest install it via composer:

composer require clarence/laravel-default-routes

Then, register the DefaultRouteProvider. For example, add \Clarence\LaravelDefaultRoutes\DefaultRouteProvider::class to the providers section in config/app.php.

// config/app.php
return [

    //...
    
    'providers' => [
        //...
        App\Providers\EventServiceProvider::class,
        App\Providers\RouteServiceProvider::class,
        
        Clarence\LaravelDefaultRoutes\DefaultRouteProvider::class,  // add DefaultRouteProvider below the RouteServiceProvider
        
        //...
   
    ],
    
    //...

]; 

Routes Maps

foo/bar will be mapped to \App\Http\Controllers\FooController@doGetBar by default.

Note:

  1. \App\Http\Controllers\ is the namespace prefix of the controller. It can be configurated as laravel-default-routes.controller-prefix.
  2. In FooController, Controller is the class name suffix. It can be configurated as laravel-default-routes.controller-suffix.
  3. doGetBar is the actual method to be executed. It is do + <HTTP_METHOD> + <action>. And it should be a public method. Otherwise a 404 or 405 HTTP error will be thrown.
  4. If \App\Http\Controllers\FooController@doGetBar cannot be found, \App\Http\Controllers\Foo\BarController@doGetIndex will be tried.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-04-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固