PHPackages                             tkeer/ease-request - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. tkeer/ease-request

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

tkeer/ease-request
==================

A laravel package to ease Input validation

v1.0.2(8y ago)4155MITPHP

Since Jul 23Pushed 8y ago2 watchersCompare

[ Source](https://github.com/tkeer/easerequest)[ Packagist](https://packagist.org/packages/tkeer/ease-request)[ RSS](/packages/tkeer-ease-request/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

How it works
------------

[](#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
-----------------

[](#about-easerequest)

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

Example
-------

[](#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
------------

[](#installation)

`composer require tkeer/ease-request 1.*`

Usage
-----

[](#usage)

### Using abstract class EaseRequest

[](#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

[](#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.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

3218d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2963b3febf382bb84555aa913bfcba0a0c008189515c9f7e6d68e4baaf46627a?d=identicon)[tkeer](/maintainers/tkeer)

---

Top Contributors

[![tkeer](https://avatars.githubusercontent.com/u/20635376?v=4)](https://github.com/tkeer "tkeer (9 commits)")

---

Tags

laravelvalidationrulesdynamic

### Embed Badge

![Health badge](/badges/tkeer-ease-request/health.svg)

```
[![Health](https://phpackages.com/badges/tkeer-ease-request/health.svg)](https://phpackages.com/packages/tkeer-ease-request)
```

###  Alternatives

[resultsystems/validation

Inspired 'KennedyTedesco Validation' - The power of 'Respect Validation' on Laravel.

2832.4k4](/packages/resultsystems-validation)[carsdotcom/laravel-json-schema

Json Schema validation for Laravel projects

1036.7k3](/packages/carsdotcom-laravel-json-schema)[iutrace/laravel-cuit-validator

Argentinian CUIT and CUIL Validator

1013.3k](/packages/iutrace-laravel-cuit-validator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
