amhol/extendable-routing 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

amhol/extendable-routing

Composer 安装命令:

composer require amhol/extendable-routing

包简介

Adds an extend method to the Laravel-4 router allowing you to add custom route extensions

README 文档

README

Adds an extend method to the Laravel-4 router allowing you to add custom route extensions

Installation

Begin by installing this package through Composer. Edit your project's composer.json file to require amhol/extendable-routing.

"require": {
    "amhol/extendable-routing": "1.*"
}

Next, update Composer from the Terminal:

composer update

Once this operation completes, the final step is to add the service provider. Open app/config/app.php, and add a new item to the providers array.

'AMHOL\ExtendableRouting\ExtendableRoutingServiceProvider'

Usage

Firstly, you need to add your route extensions, I prefer to do this by adding an app/routeextensions.php file as below:

<?php

/*
|--------------------------------------------------------------------------
| Application Route Extensions
|--------------------------------------------------------------------------
|
| Here is where you can extend the router with your own methods.
| It's a breeze. Simply tell the Laravel Router the methods it should 
| respond to and give it the Closure to execute when that method is 
| called.
|
*/

// Route::extend('api', function($resources, $actions = ['index', 'show', 'update', 'create']) {
//     // my custom extension
//     // Route::get($resources, ...);
// });

Then adding the following to the bottom of app/start/global.php:

require app_path().'/routeextensions.php';

You can then access your custom routing methods via the Route facade in routes.php as normal.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2014-06-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固