tohuma/laravel-routes 问题修复 & 功能扩展

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

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

tohuma/laravel-routes

Composer 安装命令:

composer require tohuma/laravel-routes

包简介

Grouping of routes on laravel

README 文档

README

license

Inspired by Laravel Multiple Routes

This package allow grouping routes by namespace, you only need to create a directory with the namespace on "../Http/Controllers/". Also it is necessary to create the file routes.php on that directory.

This package doesn't disable the default routes of Laravel.

Required

PHP 5.5+ Laravel 5.x+ are required

Installation

You can install this package quickly and easily with Composer.

Run the following command in your terminal:

composer require tohuma/laravel-routes

Add RouteServiceProvider in config/app.php

'providers' => [
     ...
     Tohuma\Laravel\Routes\Providers\RouteServiceProvider::class,
],

Example Usage

Create directory Blog in App\Http\Controllers.

Create file routes.php in App\Http\Controllers\Blog and add yours routes.

<?php

Route::get('welcome', function () {
    return 'Welcome to my blog';
});

Callback in browser

http://<servername>/blog/welcome

Other Example

Create file BlogController.php in App\Http\Controllers\Blog and add this script.

<?php

namespace App\Http\Controllers\Blog;

use App\Http\Controllers\Controller;

class BlogController extends Controller
{
	public function comments()
	{
		return 'This is my list comments';
	}
}

Add in App\Http\Controllers\Blog\routes.php

<?php
...
Route::get('comments', 'BlogController@comments'); 

Callback

http://<servername>/blog/comments

Version

v1.0.0

License

Laravel Routes is licensed The MIT License (MIT).

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固