PHP code example of jaygaha / lumen-form-request
1. Go to this page and download the library: Download jaygaha/lumen-form-request library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jaygaha / lumen-form-request example snippets
$app->register(JayGaha\LumenFormRequest\Providers\FormRequestServiceProvider::class);
$app->withFacades();
$app->withEloquent();
declare(strict_types=1);
namespace App\Http\Requests;
use JayGaha\LumenFormRequest\Requests\FormRequest;
class CreateUserFormRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*/
public function rules(): array
{
return [
//
];
}
}
bash
php artisan make:request-form CreateUserFormRequest