Download the PHP package thejawker/laravel-route-module-macro without Composer
On this page you can find all versions of the php package thejawker/laravel-route-module-macro. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download thejawker/laravel-route-module-macro
More information about thejawker/laravel-route-module-macro
Files in thejawker/laravel-route-module-macro
Package laravel-route-module-macro
Short Description Exposes a module concept to enforce a CRUD and Restful way of routing and naming convention.
License MIT
Homepage https://github.com/thejawker/laravel-route-module-macro
Informations about the package laravel-route-module-macro
Exposes a module concept to enforce a CRUD and Restful way of routing and naming convention.
This package works with Laravel 5.5. It is very much inspired by the great Freek van der Herten with their Blender Package, where he has a Macro for a module. This really resonates with the CRUD/Restful approach on routing.
Installation
Require the package from Composer:
As of Laravel 5.5 it will magically register the package.
Usage
You can add Route::module('name', ['only'](optional), ['options](optional))
in any of your routes files.
The second parameter will allow you to only
use specific actions, and the third being general options. Refer to the Laravel docs for those.
Examples:
Full Resource
routes/api.php
Only Resource
routes/api.php
Nested Resources
This will enforce you to write Controllers that make sense. A nested users.posts
will require you to create a UserPostsController with the required actions.
routes/api.php
Test
This package definitely needs some extensive testing.
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-route-module-macro with dependencies
illuminate/support Version ~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0
illuminate/validation Version ~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0
illuminate/pagination Version ~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0
illuminate/view Version ~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0