Package Data | |
---|---|
Maintainer Username: | andreaspabst |
Maintainer Contact: | management@andreaspabst.com (Andreas Pabst) |
Package Create Date: | 2019-03-17 |
Package Last Update: | 2019-03-17 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-15 15:12:24 |
Package Statistics | |
---|---|
Total Downloads: | 258 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Adds the well known Laravel ability to separate validations from the controller.
First use composer to install the package..
composer require andreaspabst/lumen-request-validation
Next register the packages service provider in your bootstrap/app.php
$app->register(AndreasPabst\RequestValidation\RequestServiceProvider::class);
Then you are able to create requests with artisan comparable to laravel
php artisan make:request RequestName
The new class can be found under app/Http/Requests folder.
Use your Request class in a controller via method injection
<?php
use App\Http\Requests\ExampleRequest;
class ExampleController extends Controller
{
public function index(ExampleRequest $request) {
// ...
}
//...
}
Have Fun Using!
If you discover any security related issues, please email management@andreaspabst.com instead of using the issue tracker.
You're free to use this package, but if it makes it to your product we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.
Our address is provided on Andreas Pabst.com
We publish all received postcards on our website.
Andreas Pabst
The MIT License (MIT). Please see License File for more information.