PHPackages                             ryanroydev/autogenerate-request-rule - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ryanroydev/autogenerate-request-rule

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ryanroydev/autogenerate-request-rule
====================================

A custom Laravel package

1.0.1(1y ago)442MITPHPPHP ^7.3|^8.0

Since Nov 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ryanroydev/autogenerate-request-rule)[ Packagist](https://packagist.org/packages/ryanroydev/autogenerate-request-rule)[ RSS](/packages/ryanroydev-autogenerate-request-rule/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (4)Used By (0)

Autogenerate Request Rule
=========================

[](#autogenerate-request-rule)

[![Total Downloads](https://camo.githubusercontent.com/5e3108ecf66f905a5f38d7e76afcd5ce7ddd941f29e9d6818b302610b600f87c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7279616e726f796465762f6175746f67656e65726174652d726571756573742d72756c652e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/5e3108ecf66f905a5f38d7e76afcd5ce7ddd941f29e9d6818b302610b600f87c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7279616e726f796465762f6175746f67656e65726174652d726571756573742d72756c652e7376673f7374796c653d666c61742d737175617265)[![Latest Version](https://camo.githubusercontent.com/342391af5835e413205d269c1f8bf487a48fd2f3936e3307ec6870c5c21e0315/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f7279616e726f796465762f6175746f67656e65726174652d726571756573742d72756c652e7376673f7374796c653d666c61742d737175617265)](https://github.com/ryanroydev/autogenerate-request-rule/releases)[![License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE)

A custom Laravel package that automatically generates request validation rules for your application.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Available Commands](#available-commands)
- [Usage](#usage)
- [Required Inputs in Form View](#required-inputs-in-form-view)
- [Returning Views in Controller](#returning-views-in-controller)
- [License](#license)

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

[](#installation)

You can install the package via Composer. Run the following command in your Laravel application's root directory:

```
composer require ryanroydev/autogenerate-request-rule
```

Available Commands
------------------

[](#available-commands)

You can use the following Artisan command to generate request validation rules for a specified controller:

```
php artisan ryanroydev:autogenerate-request-rule ControllerClass
```

Replace ControllerClass with the name of your controller.

Input and Output
----------------

[](#input-and-output)

[![Input Image](https://camo.githubusercontent.com/133de8d0b8efdfc9b503ab3bb466fc162e2b92e9e2b4068f1098479920a03dcc/68747470733a2f2f7279616e726f796465762e6769746875622e696f2f6175746f67656e65726174652d726571756573742d72756c652f696e7075742e504e47)](https://camo.githubusercontent.com/133de8d0b8efdfc9b503ab3bb466fc162e2b92e9e2b4068f1098479920a03dcc/68747470733a2f2f7279616e726f796465762e6769746875622e696f2f6175746f67656e65726174652d726571756573742d72756c652f696e7075742e504e47)

[![Output Image](https://camo.githubusercontent.com/62bce6350e9b4c467d2e8bb281c9923f87d2858293d4594dca1ca1ba6f49d5df/68747470733a2f2f7279616e726f796465762e6769746875622e696f2f6175746f67656e65726174652d726571756573742d72756c652f6f75747075742e504e47)](https://camo.githubusercontent.com/62bce6350e9b4c467d2e8bb281c9923f87d2858293d4594dca1ca1ba6f49d5df/68747470733a2f2f7279616e726f796465762e6769746875622e696f2f6175746f67656e65726174652d726571756573742d72756c652f6f75747075742e504e47)

Required Inputs in Form View
----------------------------

[](#required-inputs-in-form-view)

When creating your form views, Ensure that the input has a name attribute and type attribute.

```

```

Returning Views in Controller
-----------------------------

[](#returning-views-in-controller)

Please ensure that your selected controller class includes a return view in order for the command to detect it:

```
public function create()
{
    return view('your_view_name'); // Replace 'your_view_name' with the actual view file name
}
```

Usage
-----

[](#usage)

Once you have generated the request rules, you can use them in your controllers to validate incoming requests. Here's an example of how to apply the generated rules:

```
use App\Http\Requests\YourGeneratedRequest;

public function store(YourGeneratedRequest $request)
{
    // The incoming request is valid...
    // Your logic here
}
```

License
-------

[](#license)

MIT License

Copyright (c) 2024 ryanroydev

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

1. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
2. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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 ~1 days

Total

2

Last Release

561d ago

### Community

Maintainers

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

---

Top Contributors

[![ryanroydev](https://avatars.githubusercontent.com/u/62012610?v=4)](https://github.com/ryanroydev "ryanroydev (44 commits)")

---

Tags

custom-requestlaravellaravel-packagerules

### Embed Badge

![Health badge](/badges/ryanroydev-autogenerate-request-rule/health.svg)

```
[![Health](https://phpackages.com/badges/ryanroydev-autogenerate-request-rule/health.svg)](https://phpackages.com/packages/ryanroydev-autogenerate-request-rule)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

20917.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9346.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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