PHPackages                             shureban/laravel-easy-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. shureban/laravel-easy-request

ActiveLaravel-package

shureban/laravel-easy-request
=============================

Laravel easy way to write methods for requests

1.0.0(1y ago)32.5k↓100%MITPHPPHP ^8.1

Since Jun 8Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Shureban/laravel-easy-request)[ Packagist](https://packagist.org/packages/shureban/laravel-easy-request)[ RSS](/packages/shureban-laravel-easy-request/feed)WikiDiscussions master Synced today

READMEChangelog (3)DependenciesVersions (4)Used By (0)

Laravel easy request
====================

[](#laravel-easy-request)

Installation
------------

[](#installation)

Require this package with composer using the following command:

```
composer require shureban/laravel-easy-request
```

Add the following class to the `providers` array in `config/app.php`:

```
Shureban\LaravelEasyRequest\EasyRequestServiceProvider::class,
```

You can also publish the config file to change implementations (ie. interface to specific class).

```
php artisan vendor:publish --provider="Shureban\LaravelEasyRequest\EasyRequestServiceProvider"
```

How to use
----------

[](#how-to-use)

All what you need, that is type PhpDoc for your request class.

For example:

```
/**
 * @method string name()
 * @method boolean isConfirmed()
 * @method bool isAdult()
 * @method integer age()
 * @method int size()
 * @method float salary()
 * @method array workingDays()
 * @method mixed description()
 * @method additionalInformation()
 * @method string|null managerName()
 * @method DateTime birthday()
 * @method Carbon firstWorkingDay()
 */
class CustomRequest extends \Illuminate\Foundation\Http\FormRequest
{
}

class RegistrationController extends Controller
{
    public function __invoke(CustomRequest $request): JsonResponse
    {
        dd(
            $request->name(), // return value with string type
            $request->isConfirmed(), // return value with bool type
            $request->isAdult(), // return value with bool type
            $request->age(), // return value with integer type
            $request->size(), // return value with integer type
            $request->salary(), // return value with float type
            $request->workingDays(), // return array value
            $request->description(), // return original value
            $request->additionalInformation(), // return original value
            $request->managerName(), // return string value or NULL
            $request->birthday(), // return date with type DateTime
            $request->firstWorkingDay(), // return date as Carbon type
        );
    }
}
```

That is not a problem if you methods written in camelCase format and your request data in snake\_case. You may use any of cases to get your value.

For example:

```
/**
 * @method int userId()
 * @method int client_id()
 */
class CustomRequest extends \Illuminate\Foundation\Http\FormRequest
{
    public function rules(): array
    {
        return [
            'user_id' => ['required', 'int'],
            'clientId' => ['required', 'int'],
        ];
    }
}

class RegistrationController extends Controller
{
    public function __invoke(CustomRequest $request): JsonResponse
    {
        dd(
            $request->userId(), // return value for field user_id
            $request->client_id(), // return value for field clientId
        );
    }
}
```

If you need to work with models, and get model by field\_id, that is easy.

For example:

```
/**
 * @method User user()
 */
class CustomRequest extends \Illuminate\Foundation\Http\FormRequest
{
    public function rules(): array
    {
        return [
            'user_id' => ['required', 'int'],
        ];
    }
}

class RegistrationController extends Controller
{
    public function __invoke(CustomRequest $request): JsonResponse
    {
        dd(
            $request->user(), // return instance of models User
        );
    }
}
```

You have to name your property with \_id ending or Id(in camel case), and set method type which is extends Model.

###  Health Score

32

—

LowBetter than 74% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 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

652d ago

Major Versions

0.0.2 → 1.0.02024-06-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/d6df85acf6d2ae745da6af44e0db9c97e64c528ef5b9b0276bad5c4ac7f3888a?d=identicon)[Shureban](/maintainers/Shureban)

---

Top Contributors

[![Shureban](https://avatars.githubusercontent.com/u/5560764?v=4)](https://github.com/Shureban "Shureban (7 commits)")

---

Tags

requestlaravelform-requestshureban

### Embed Badge

![Health badge](/badges/shureban-laravel-easy-request/health.svg)

```
[![Health](https://phpackages.com/badges/shureban-laravel-easy-request/health.svg)](https://phpackages.com/packages/shureban-laravel-easy-request)
```

###  Alternatives

[tucker-eric/laravel-xml-middleware

A Laravel Middleware to accept XML requests

181.2M](/packages/tucker-eric-laravel-xml-middleware)[kitloong/laravel-app-logger

Laravel log for your application

101.2M6](/packages/kitloong-laravel-app-logger)[pyaesone17/active-state

Active State Checker For Laravel Url

4761.8k](/packages/pyaesone17-active-state)[jedrzej/withable

Withable trait for Laravel's Eloquent models

25190.3k2](/packages/jedrzej-withable)[mnabialek/laravel-eloquent-filter

Allows filtering Eloquent queries by input filters

2514.4k](/packages/mnabialek-laravel-eloquent-filter)[chelout/laravel-http-logger

A Laravel package to log HTTP requests, headers and sessions

272.0k](/packages/chelout-laravel-http-logger)

PHPackages © 2026

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