GET GET Use the Slim application’s get() method to map a callback function to a resource URI that is requested withthe HTTP GET method. <? php $app = new \Slim\Slim ();...
Middleware What is middleware? How does middleware work? How do I write middleware? Closure middleware example. Invokable class middleware example How do I add middleware? App...
Retrieving Current Route Retrieving Current Route If you ever need to get access to the current route within your application all you have to do is call the request class’ getA...
CSRF Protection Installation Usage Fetch the CSRF token name and value CSRF Protection Slim 3 uses the optional standalone slimphp/Slim-Csrf PHP component to protect your ap...
Overview Overview Heads Up! Flash messages require sessions. If you do not use the \Slim\Middleware\SessionCookie middleware, you must start a native PHP session yourself. S...
Custom Custom Custom hooks may be created and invoked in a Slim application. When a custom hook is invoked with applyHook() , it willinvoke all callables assigned to that hook....
Trailing / in routes Retrieving IP address Retrieving Current Route Using Eloquent with Slim Using Doctrine with Slim Using Atlas with Slim Enabling CORS Getting and Mocki...
POST POST Use the Slim application’s post() method to map a callback function to a resource URI that is requested withthe HTTP POST method. <? php $app = new \Slim\Slim...
Overview Overview A Slim application delegates rendering of templates to its view object. A Slim application view is a subclassof \Slim\View that implements this interface: <...