Download the PHP package wronx/lumen-rest-object-fetch-middleware without Composer
On this page you can find all versions of the php package wronx/lumen-rest-object-fetch-middleware. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wronx/lumen-rest-object-fetch-middleware
More information about wronx/lumen-rest-object-fetch-middleware
Files in wronx/lumen-rest-object-fetch-middleware
Package lumen-rest-object-fetch-middleware
Short Description Simple Lumen middleware for simple fetching simple objects in simple REST API endpoints
License WTFPL
Informations about the package lumen-rest-object-fetch-middleware
Lumen REST Object Fetch Middleware
IMPORTANT: This package is a work in progress, it it not stable by any means.
Use responsibly! Or don't use at all and wait for v1.0.
The purpose of this project
It was created to avoid repetitive 404 (and other) checks when hitting CRUD endpoints of API.
Is it any good?
(well, it will be in stable version... I hope...)
Installation
-
Install the package with Composer:
- Enable it in
bootstrap/app.php
:
Usage
-
In
routes/web.php
assign it to route which requiresid
parameter, giving it model's class name: - In Controller methods that are covered by this middleware you don't have to check if object exists and you don't have to fetch it again from DB:
Contributing
If you want to contribute, please wait. Until stable version arrives I want to shape this package in my specific way. Later on, pull requests will be welcome.
License:
Copyright © 2016 github.com/WRonX
This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See http://www.wtfpl.net/ for more details
All versions of lumen-rest-object-fetch-middleware with dependencies
illuminate/http Version ^5.7
illuminate/support Version ^5.7
symfony/http-kernel Version ^4.1