PHPackages                             asif160627/laravel-resources-generator - 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. [Database &amp; ORM](/categories/database)
4. /
5. asif160627/laravel-resources-generator

ActiveLibrary[Database &amp; ORM](/categories/database)

asif160627/laravel-resources-generator
======================================

Generate Laravel Model,Migration,Service,Controller,Resources with single command

v6.1.0(1y ago)2736MITPHP

Since Aug 19Pushed 1y ago1 watchersCompare

[ Source](https://github.com/md-asifiqbal/laravel-generate-resources)[ Packagist](https://packagist.org/packages/asif160627/laravel-resources-generator)[ Docs](https://github.com/md-asifiqbal/laravel-generate-resources)[ RSS](/packages/asif160627-laravel-resources-generator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (21)Used By (0)

Laravel Generate Resources
==========================

[](#laravel-generate-resources)

Generate Laravel Model, Migration, Service, Controller, Resources with a single command.

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

[](#installation)

You can install this package via Composer:

```
composer require asif160627/laravel-resources-generator
```

Usage
-----

[](#usage)

After installing the package, you can use the generate:resource command to generate the necessary files for a resource:

```
php artisan generate:resource {name} {--type=page|modal}
```

Replace {name} with the desired name of your resource. This command will generate a model, migration, service, controller, resource, and other related files.

Replace {name} with the desired name for your resource. The command will create the following files associated with the specified resource:

The `generate:resource` command creates the following files for a new resource:

- A model with the specified name.
- A migration file for the model's database table.
- A service class for managing the resource's business logic.
- A controller for handling HTTP requests and responses.
- A resource class for formatting the resource's data in API responses.
- A request class for validating input data.

Publishing Resources
--------------------

[](#publishing-resources)

This package supports resource publishing, allowing you to customize the generated files to fit your project's needs. To publish the package's resources, you can use the following command:

```
php artisan vendor:publish --provider="Asif160627\GenerateResources\ResourceServiceProvider"
```

This command will list the available resources for publishing. You can choose which resources you want to publish by selecting the associated numbers.

Example
-------

[](#example)

For instance, if you want to generate the necessary files for a resource named "Product," you would execute the following command:

```
php artisan generate:resource Product
```

Subfolders
----------

[](#subfolders)

If you want to organize the generated files within a specific subfolder, you can specify the subfolder along with the resource name. For example, to create a Product resource within an Admin subfolder, use the following command:

```
php artisan generate:resource Admin/Product
```

The command will create the necessary files for the Product resource within the Admin subfolder.

Customizing Generated Files
---------------------------

[](#customizing-generated-files)

The generate:resource command streamlines the process of generating common resource files. However, you can always modify and extend these files further to match your project's specific requirements.

Testing
-------

[](#testing)

To run the package tests, execute the following command:

```
php artisan test --filter GenerateResourcesCommandTest
```

This will run the tests for the generate:resource command and ensure its functionality.

Contributing
------------

[](#contributing)

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

License
-------

[](#license)

This package is open-source software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Recently: every ~67 days

Total

20

Last Release

600d ago

Major Versions

v1.1.6 → v2.0.02023-12-22

v2.1.5 → v3.0.02023-12-26

v3.1.1 → v5.0.02023-12-26

v5.0.3 → v6.0.02023-12-26

v3.1.0 → v6.1.02024-09-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/a77f8516c8bf12baafd0c97c6625b2dd28255a9181169953e85abd48c4ecebf5?d=identicon)[md-asifiqbal](/maintainers/md-asifiqbal)

---

Top Contributors

[![md-asifiqbal](https://avatars.githubusercontent.com/u/71099428?v=4)](https://github.com/md-asifiqbal "md-asifiqbal (40 commits)")

---

Tags

controllergenerate-resourceslaravellaravel10migrationmodelresourcesservicelaravelmigrationmodelartisancommandcontrollerservicesresourcesgenerate

### Embed Badge

![Health badge](/badges/asif160627-laravel-resources-generator/health.svg)

```
[![Health](https://phpackages.com/badges/asif160627-laravel-resources-generator/health.svg)](https://phpackages.com/packages/asif160627-laravel-resources-generator)
```

###  Alternatives

[scrumble-nl/laravel-csr

This package makes it possible to generate a controller, service, repository, model and migration all in 1 command

4219.2k](/packages/scrumble-nl-laravel-csr)

PHPackages © 2026

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