Download the PHP package brayniverse/laravel-route-macros without Composer
On this page you can find all versions of the php package brayniverse/laravel-route-macros. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download brayniverse/laravel-route-macros
More information about brayniverse/laravel-route-macros
Files in brayniverse/laravel-route-macros
Package laravel-route-macros
Short Description A collection of useful route macros.
License MIT
Homepage https://github.com/brayniverse/laravel-route-macros
Informations about the package laravel-route-macros
Laravel route macros
Installation
Begin by installing the package through Composer.
Then add the following to your providers array in config/app.php
.
Usage
view
Normally you'd have to return a view in either a controller method or callback like the following:
Now you can do the same in one line.
redirect
Normally you'd have to create a closure to redirect to the new route.
Now you can do the same in one line.
Optionally, you can pass a third argument to Route::redirect()
which will set the status code when redirecting. If you do not specify a status code, the package will use 301
as the status code.
Credits
- Christopher L Bray
- All Contributors
All versions of laravel-route-macros with dependencies
illuminate/support Version 5.1.* || 5.2.* || 5.3.* || 5.4.*
illuminate/http Version 5.1.* || 5.2.* || 5.3.* || 5.4.*