New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

tohuma/laravel-routes

Grouping of routes on laravel
18
Install
composer require tohuma/laravel-routes
Latest Version:v1.0.0
License:MIT
Last Updated:May 5, 2016
Links: GitHub  ·  Packagist
Maintainer: tohuma

Laravel Routes

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).

Related Packages

avnir/easyrouting

Make route handling in Laravel easier

280 0
leon-b/sextant

Get a list of laravel routes in your browser

20 0
sbine/route-viewer

A Laravel Nova tool to view your registered routes.

300,221 57
vaened/laroute

An enhanced Laravel extension to export named routes to JavaScript, allowing you...

138,242 4
bluedragon/laravel-routes

Publish Laravel routes to JavaScript

96,732 11

Version History

Version Released License
v1.0.0 MIT