Skip to content

Laravel Form Request adaptation for Lumen framework

Notifications You must be signed in to change notification settings

seytar/lumen-form-request

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

lumen-form-request

Laravel Form Request adaptation for Lumen framework

How to install

Lumen 5.6 +

composer require seytar/lumen-form-request
  • Add the service provider in bootstrap/app.php
$app->register(Urameshibr\Providers\FormRequestServiceProvider::class);

Next step is create your FormRequest and extends from Urameshibr/Requests/FormRequest

Example

<?php

namespace App\Http\Requests;

use Urameshibr\Requests\FormRequest;

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

	public function rules()
	{
		return [
			'mac_address' => 'required|unique:devices,mac_address'
		];
	}
}
  • Link for Laravel Form Request documentation

https://laravel.com/docs/5.4/validation#available-validation-rules

Enjoy!

About

Laravel Form Request adaptation for Lumen framework

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%