Download the PHP package router/slim without Composer
On this page you can find all versions of the php package router/slim. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Vendor router
Package slim
Short Description Slim Router
License MIT
Homepage https://github.com/AmChella/router-slim
Package slim
Short Description Slim Router
License MIT
Homepage https://github.com/AmChella/router-slim
Please rate this library. Is it a good library?
Informations about the package slim
Slim-Router
application with Slim Framework
Installation
Use Composer
Do Composer Require as below
Create instance
Note: The router will support GET
|POST
|PUT
|OPTIONS
alone
Create a routes as below and send the routes as array.
url
is the path of routemethod
is http method like get|post. you can specify it either small or capsrouteBeforeInvoke
is a special routing like middleware(optional). this is will be invoked before actual method call and the response will to forwared with method|function name asarray
.invoke
is callback placeholder.class
is a service name andfunction
is callback method. If you were using DI container then provide full path of the service name.[/{return}]
is a optional routing, which is used to return a response asjson
,raw
,download
. You can specify it either uri routing or explicitly in array as mentioned above.download
is will force the response as downloadable request. Note* its return values should be like below in the response section.
Your service Response should like below
If return type is Download
then the method response should be Array like below
If return type is Download
then the method response should be array like below
If return type is raw
then the method response should be a string like below
Example 1
Cors values
Router request body should like below
Request body -> GET
Request body -> POST
Request body -> PUT
Request body -> POST
Example
Stargazers over time
Here you go!
☺ Happy routing
All versions of slim with dependencies
PHP Build Version
Package Version
Requires
slim/http Version
^1.0
slim/psr7 Version ^1.0
http-interop/http-factory-guzzle Version ^1.0
laminas/laminas-diactoros Version ^2.2
php Version ^7.2||^8.0
slim/slim Version ^4.0
nyholm/psr7 Version ^1.0
nyholm/psr7-server Version ^1.0
guzzlehttp/psr7 Version ^2.0
slim/psr7 Version ^1.0
http-interop/http-factory-guzzle Version ^1.0
laminas/laminas-diactoros Version ^2.2
php Version ^7.2||^8.0
slim/slim Version ^4.0
nyholm/psr7 Version ^1.0
nyholm/psr7-server Version ^1.0
guzzlehttp/psr7 Version ^2.0
The package router/slim contains the following files
Loading the files please wait ....