Leaf tries as much as possible to use raw PHP written from scratch, so, instead of using PSR-7 like most frameworks do, Leaf has written predefined request methods. The request section basically deals with requests made to the app, so far, there are only two functions chained to the Request class. To use the request object, you simply need to pass $request into your $route like this.
Note that from v1.3, Request is part of the HTTP namespace.
To include the Request object in a route, use this:
Requestclass, and we pass it into the route with
getParam is a method built for APIs, but can be used in a normal web app/website. It takes in one parameter: the name of the param passed into the app through the request
It works just like how
getParam() now supports native get and post requests...as well as put requests
getBody() returns the key => value pairs of all the request data
Next StepsSimple Routing