Currently, the Quantum PHP framework supports the following route definitions:
get($uri, $controller, $action)
post($uri, $controller, $action)
add($uri, $method, $controller, $action) – generic for any HTTP method
To improve developer ergonomics and consistency, we want to introduce shorthand methods for PUT and DELETE HTTP methods, just like we have for GET and POST.
Objective
Add two new shorthand methods to the router:
put($uri, $controller, $action)
delete($uri, $controller, $action)
These methods should internally call the add() method using 'PUT' and 'DELETE' respectively.
Example Usage
$route->put('[:alpha:2]?/my-posts/update/[id=:any]', 'PostController', 'update');
$route->delete('[:alpha:2]?/my-posts/delete-image/[id=:any]', 'PostController', 'deleteImage');
Currently, the Quantum PHP framework supports the following route definitions:
get($uri, $controller, $action)post($uri, $controller, $action)add($uri, $method, $controller, $action)– generic for any HTTP methodTo improve developer ergonomics and consistency, we want to introduce shorthand methods for
PUTandDELETEHTTP methods, just like we have forGETandPOST.Objective
Add two new shorthand methods to the router:
put($uri, $controller, $action)delete($uri, $controller, $action)These methods should internally call the add() method using 'PUT' and 'DELETE' respectively.
Example Usage