Download the PHP package lextira/laravel-formrequest-singleton without Composer
On this page you can find all versions of the php package lextira/laravel-formrequest-singleton. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download lextira/laravel-formrequest-singleton
More information about lextira/laravel-formrequest-singleton
Files in lextira/laravel-formrequest-singleton
Download lextira/laravel-formrequest-singleton
More information about lextira/laravel-formrequest-singleton
Files in lextira/laravel-formrequest-singleton
Vendor lextira
Package laravel-formrequest-singleton
Short Description Use Laravel's excellent FormRequest as Singleton.
License MIT
Package laravel-formrequest-singleton
Short Description Use Laravel's excellent FormRequest as Singleton.
License MIT
Please rate this library. Is it a good library?
Informations about the package laravel-formrequest-singleton
laravel-formrequest-singleton
Use Laravel's excellent FormRequest as Singleton
Installation
- run
composer require lextira/laravel-formrequest-singleton
- open
config/app.php
in your project - replace
Illuminate\Foundation\Providers\FoundationServiceProvider::class
withLextira\FormRequestSingleton\FoundationServiceProvider::class
- done!
Usage
All classes, which extend Illuminate\Foundation\Http\FormRequest
are now instantiated as singleton.
This brings the following benefits:
- Changes done to the request by
prepareForValidation()
are applied only once, even if the FormRequest is used multiple times. - The request validation is run only once, therefore especially database queries run only once.
All versions of laravel-formrequest-singleton with dependencies
PHP Build Version
Package Version
The package lextira/laravel-formrequest-singleton contains the following files
Loading the files please wait ....