| Package Data | |
|---|---|
| Maintainer Username: | treehousetim |
| Maintainer Contact: | treehousetim@gmail.com (Tim Gallagher) |
| Package Create Date: | 2021-12-02 |
| Package Last Update: | 2022-05-06 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-04 15:07:26 |
| Package Statistics | |
|---|---|
| Total Downloads: | 229 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 0 |
| Total Watchers: | 1 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
Provides a standard way of providing JSON formatted output no matter what the application sends
For all endpoints
Modify your app.php
$app->middleware([
treehousetim\lumen_middleware\jsonStandardResponse::class
]);
Automatically validates uuid's in url parameters based on routes with the first parameter intended to be a UUID Only validates it is present and is a proper UUID.
Use in a controller's __construct method
class MyController extends Controller
{
public function __construct()
{
$this->middleware( 'ID_UUID',
['only'=>[
'get',
'update',
'destroy'
]]
);
}
...
}