2017 © Pedro Peláez
 

library laravel-routes

Grouping of routes on laravel

image

tohuma/laravel-routes

Grouping of routes on laravel

  • Thursday, May 5, 2016
  • by tohuma
  • Repository
  • 1 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Laravel Routes

license, (*1)

Inspired by Laravel Multiple Routes, (*2)

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., (*3)

This package doesn't disable the default routes of Laravel., (*4)

Required

PHP 5.5+ Laravel 5.x+ are required, (*5)

Installation

You can install this package quickly and easily with Composer., (*6)

Run the following command in your terminal:, (*7)

composer require tohuma/laravel-routes

Add RouteServiceProvider in config/app.php, (*8)

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

Example Usage

Create directory Blog in App\Http\Controllers., (*9)

Create file routes.php in App\Http\Controllers\Blog and add yours routes., (*10)

<?php

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

Callback in browser, (*11)

http://<servername>/blog/welcome

Other Example

Create file BlogController.php in App\Http\Controllers\Blog and add this script., (*12)

<?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, (*13)

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

Callback, (*14)

http://<servername>/blog/comments

Version

v1.0.0, (*15)

License

Laravel Routes is licensed The MIT License (MIT)., (*16)

The Versions

05/05 2016

dev-master

9999999-dev https://github.com/tohuma/laravel-routers

Grouping of routes on laravel

  Sources   Download

MIT

by Miguel Cabada

laravel group routes

05/05 2016

v1.0.0

1.0.0.0 https://github.com/tohuma/laravel-routers

Grouping of routes on laravel

  Sources   Download

MIT

by Miguel Cabada

laravel group routes