New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

tkeer/ease-request

A laravel package to ease Input validation
155 4

Larablocks Analysis

tkeer/ease-request works with Laravel 5 (latest release v1.0.2, Jul 23, 2017), which reached end of life: no more fixes, even for security.

Recommendation checks

Use with care

Use with care: meets 0 of 4 checks.

  • Supports only Laravel 5, past end of life
  • No release in the last 12 months (last: Jul 23, 2017)
  • 0 downloads a month (needs 10,000)
  • 4 GitHub stars (needs 100)

State

Quiet
  • Last stable release: Jul 23, 2017.
  • No releases in the last 12 months.
  • First released: Jul 23, 2017.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 28, 2026.

Install
composer require tkeer/ease-request
Latest Version:v1.0.2
Laravel:5
License:MIT
Last Updated:Sep 8, 2026
Links: GitHub  ·  Packagist
Maintainer: tkeer

How it works

Inside the rules function of FormRequest class, write rule like this

name => exists:users,name,group_id,{group_id}

Whenever you will place any keyword inside curly braces EaseRequest will replace those keyword with values fetched from Request or your custom function

If group_id is 3 in Request, above rule will be converted to following

name => exists:users,name,group_id,3

About EaseRequest

EaseRequest is laravel package that supports updating FormRequest validation rules at the run time.

Example

Let suppose you want to update a student data, student have class_id and school_id. You want to update student's class and you want to validate that class exists in the database. With current laravel implementation, it will work fine. Here is the rule..

class_id => exists:classes,class_id

What if you want also to verify that the class also belongs to the student's school. Laravel gives you the option for adding the where conditions to the rule.

class_id => exists:classes,class_id,NULL,id,school_id,1

But you have to provide hard coded value for where conditions.

Using this package you can update your rules at run time. You can add your keyword in culry braces and this package will fetch the values from the Request and update the rule.

class_id => exists:classes,class_id,NULL,id,school_id,{school_id}

You can also define a method to be called for updating the rules instead of fetching value from Request class. Just write the method in your class with same name of the keyword written in curly braces. This way your method will called and returned value from your method will be added at the place of the keyword.

private function school_id()
{
        return (int)\Request::get('school_id');
}

Installation

composer require tkeer/ease-request 1.*

Usage

Using abstract class EaseRequest

Extend your class by EaseRequest instead of FormRequest, implement abstract function preRules in your class and define all your rules in that function.

Using trait EaseRequestTrait

Extend your class by FormRequest and add EaseRequestTrait in the class. Define preRules function in you class and add all your rules in that function.

Alternatives to tkeer/ease-request

umbrellio/laravel-common-objects

Common objects for extending base Laravel functionality.

129,103 2
jekk0/laravel-iso3166-validation-rules

Laravel/Lumen validation rules for validate country codes (ISO3166-1)

108,850 2
vdhicts/laravel-validation-rules

Collection of validation rules for Laravel.

29,264 6
datalogix/laravel-validation

Laravel Validation is a package that brings the power of Respect Validation.

8,841 3
tanthammar/laravel-extras

Custom validation rules for the Laravel Framework

2,069 3

Version History

Version Released Laravel License
v1.0.2 >=5.0 MIT
1.0.1 MIT
1.0 MIT