mawuva / laravel-form-request by dasain

Laravel Form Request adaptation for Lumen Framework
135
1
1
Package Data
Maintainer Username: dasain
Maintainer Contact: seddorephraim7@gmail.com (Ephraïm Seddor)
Package Create Date: 2021-06-11
Package Last Update: 2022-04-21
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-11-19 03:14:24
Package Statistics
Total Downloads: 135
Monthly Downloads: 1
Daily Downloads: 0
Total Stars: 1
Total Watchers: 1
Total Forks: 0
Total Open Issues: 0

Laravel Form Request adaptation for Lumen Framework

This package is a Laravel Form Request adaptation for Lumen Framework. You can use it in Laravel also but, it's not necessary.

Installation

You can install the package via composer:

composer require mawuekom/laravel-form-request

Make some configs

  • Add the service provider in bootstrap/app.php
$app->register(Mawuekom\FormRequest\FormRequestServiceProvider::class);

Next step is create your FormRequest and extends from Mawuekom/FormRequest/Http/FormRequest

Usage

<?php

namespace App\Http\Requests;

use Mawuekom\FormRequest\Http\FormRequest;

class StoreUserRequest extends FormRequest
{
	public function authorize()
	{
		return true;
	}

	public function rules()
	{
		return [
			'name' => 'required|string',
			'email' => 'required|string|email',
		];
	}
}

License

The MIT License (MIT). Please see License File for more information.