Download the PHP package ahmard/quick-route without Composer
On this page you can find all versions of the php package ahmard/quick-route. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ahmard/quick-route
More information about ahmard/quick-route
Files in ahmard/quick-route
Package quick-route
Short Description Simple http router designed to look just like Laravel router
License MIT
Informations about the package quick-route
QuickRoute
An elegant http router built on top of FastRoute to provide more easy of use.
Upgrade Guide
Check ChangeLog file
Installation
Usage
Simple example
Controller-like example
Advance usage
More Advance Usage
Defining route param types
Route Fields
Fields help to add more description to route or group of routes
Route::match()
Route::match() with named routes
Route::any()
Route::matchAny()
Route::resource()
Code above will produce below routes
Crud::create()
Code above will produce below routes
Why not use Route::resource()?
Crud creator generates 6 routes, one of the routes which deletes all record in the endpoint.
With Crud creator you can choose which routes to create or not.
Routes as configuration
Caching
Cache routes so that they don't have to be collected every time.
Caching routes with closure
Note that you must specify that your routes contains closure
Passing Default Data
You can alternatively pass data to be prepended to all routes.
Cached routes must be cleared manually after setting/updating default route data.
Changing Delimiter
For usage outside of web context, a function to change default delimiter which is "/" has been provided.
Finding route & generating route uri
Note
- You must be careful when using Collector::collect() and Collector::collectFile() together,
as collectFile method will clear previously collected routes before it starts collecting.
Make sure that you call Collector::collect() first, before calling Collector::collectFile().
Licence
Route http verbs image is owned by Riptutorial.
QuickRoute is MIT licenced.
All versions of quick-route with dependencies
ext-json Version *
nikic/fast-route Version ^1.3
opis/closure Version ^3.6