PHPackages                             ixudra/generators - 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. ixudra/generators

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

ixudra/generators
=================

Custom PHP resource generation library for the Laravel framework - developed by Ixudra

6.6.2(2y ago)11.2k11MITPHPPHP ^7.2|^8.0

Since May 25Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ixudra/generators)[ Packagist](https://packagist.org/packages/ixudra/generators)[ Docs](https://ixudra.be)[ RSS](/packages/ixudra-generators/feed)WikiDiscussions master Synced 1w ago

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

ixudra/generators
=================

[](#ixudragenerators)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cea6afa121c80c3211900244f32fab639865b6904fbbe56fa0eee4ca73a9087c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6978756472612f67656e657261746f72732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ixudra/generators)![license](https://camo.githubusercontent.com/1e51cca7564ed192c25d836ed22d24f902f00571e1a79c535e2e9a6cac8ddd82/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6978756472612f67656e657261746f72732e737667)[![Total Downloads](https://camo.githubusercontent.com/0c6f878ad392a2c9a7e0475502607d3af4d552fa461efbbe41483e8e265be200/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6978756472612f67656e657261746f72732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ixudra/generators)

Custom PHP resource generation library for the Laravel framework - developed by [Ixudra](https://ixudra.be).

This package can be used by anyone at any given time, but keep in mind that it is optimized for my personal custom workflow. It may not suit your project perfectly and modifications may be in order.

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

[](#installation)

Pull this package in through Composer:

```
    {
        "require": {
            "ixudra/generators": "6.*"
        }
    }
```

Add the service provider to your app.php file:

```
    'providers'         => array(

        //...
        \Ixudra\Generators\GeneratorsServiceProvider::class,

    )
```

Usage
-----

[](#usage)

The package provides two artisan commands which you can use to generate a variety of resource files. The first command allows you generate a single file based on the specified template:

```
    php artisan generate:file fileType resourceSingular resourcePlural
```

The command accepts 3 parameters:

- `fileType`: identifier of the file that needs to be generated - required
- `resourceSingular`: the singular name of your resource - required
- `resourcePlural`: the plural name of your resource - optional

The file type parameter needs to match a key that is available in the package configuration file. Some examples that are available by default are `Model`, `Controller`, `ControllerTest`, ...

If the resource plural parameter is not provided, the package will use the singular name value and add an `s` to it by default.

If you have a resource name that consists of multiple components, you should use underscores to connect the individual components (e.g. `product type` will become `product_type`). That way, the generator will be able to generate the correct constant names and table name for your resource.

Instead of generating a single file, you can also generate all files which are listed in the package configuration file:

```
    php artisan generate:resource resourceSingular resourcePlural
```

The command parameters are identical to those of the `generate:file` command.

Configuration options
---------------------

[](#configuration-options)

### Publishing the config file

[](#publishing-the-config-file)

The package has several configuration options. In order to modify these, you will have to publish the config file using artisan:

```
    // Publish all resources from all packages
    php artisan vendor:publish

    // Publish the package config file
    php artisan vendor:publish --provider="Ixudra\\Generators\\GeneratorsServiceProvider" --tag="config"

    // Publish the package templates
    php artisan vendor:publish --provider="Ixudra\\Generators\\GeneratorsServiceProvider" --tag="templates"
```

The config file will be published to `app/config/generators.php` where you will be able to make all modifications necessary to make it work with you application.

### Custom templates

[](#custom-templates)

As of version 1.0.0, the package also supports custom templates. These templates may contain 8 different variables that you can use to customize your development flow:

Resource nameKeyExample 1: projectExample 2: product\_typeApplication namespace\##NAMESPACE##AppAppTable name\##TABLE\_NAME##projectsproduct\_typesclass name singular\##CLASS\_SINGULAR##ProjectProductTypeclass name plural\##CLASS\_PLURAL##ProjectsProductTypesvariable name singular\##VARIABLE\_SINGULAR##projectproductTypevariable name plural\##VARIABLE\_PLURAL##projectsproductTypesconstant name singular\##CONSTANT\_SINGULAR##PROJECTPRODUCT\_TYPEconstant name plural\##CONSTANT\_PLURAL##PROJECTPRODUCT\_TYPESAll variables except the namespace are determined automatically based on the parameters which are passed along to the command when called. The namespace can be set in the package `config.php` files after it has been published.

Using the previously mentioned `vendor:publish` command will also publish the default package templates into the `/resources/templates` directory within your Laravel application directory. However, you can store them anywhere you like on your system. To enable a custom template, all you need to do is change the path to the file in the package config file.

### Admin option

[](#admin-option)

The package also allows for you to generate a file or resource specifically for the admin backend. This can be done by adding the `--admin` option to the `generate:resource` or `generate:file` commands. There are 4 different parameters that can be used to modify the templates for the admin backend:

NameKeyValue if printedresource folder path\##ADMIN\_RESOURCE\_FOLDER\_PATH##/adminresource dot path\##ADMIN\_RESOURCE\_DOT\_PATH##admin.namespace path\##ADMIN\_NAMESPACE\_PATH##\\Adminclass path\##ADMIN\_CLASS\_PATH##/Adminurl path\##ADMIN\_URL\_PATH##admin/If the `--admin` flag is not provided, the admin variables will be ignored and replace with empty strings.

### Test option

[](#test-option)

Additionally, you can also add a `--test` option to the `generate:file` command. When applied, the package will also generate the appropriate test class that comes with the resource.

That's all there is to it! Have fun!

Support
-------

[](#support)

Help me further develop and maintain this package by supporting me via [Patreon](https://www.patreon.com/ixudra)!!

License
-------

[](#license)

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

Contact
-------

[](#contact)

For package questions, bug, suggestions and/or feature requests, please use the Github issue system and/or submit a pull request. When submitting an issue, always provide a detailed explanation of your problem, any response or feedback your get, log messages that might be relevant as well as a source code example that demonstrates the problem. If not, I will most likely not be able to help you with your problem. Please review the [contribution guidelines](https://github.com/ixudra/generators/blob/master/CONTRIBUTING.md) before submitting your issue or pull request.

For any other questions, feel free to use the credentials listed below:

Jan Oris (developer)

- Email:
- Telephone: +32 496 94 20 57

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 98.1% 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 ~58 days

Recently: every ~254 days

Total

61

Last Release

896d ago

Major Versions

0.1.11 → 1.0.02014-11-19

1.1.0 → 5.0.12015-02-15

5.6.4 → 6.0.02017-09-14

PHP version history (5 changes)0.1.0PHP &gt;=5.3.0

1.0.0PHP &gt;=5.4.0

6.0.0PHP &gt;=7.0.0

6.1.0PHP ^7.2

6.5.0PHP ^7.2|^8.0

### Community

Maintainers

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

---

Top Contributors

[![elimentz](https://avatars.githubusercontent.com/u/1410811?v=4)](https://github.com/elimentz "elimentz (106 commits)")[![jorenvh](https://avatars.githubusercontent.com/u/8791625?v=4)](https://github.com/jorenvh "jorenvh (2 commits)")

---

Tags

laravelgeneratorIxudra

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ixudra-generators/health.svg)

```
[![Health](https://phpackages.com/badges/ixudra-generators/health.svg)](https://phpackages.com/packages/ixudra-generators)
```

###  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)[wnx/laravel-stats

Get insights about your Laravel Project

1.8k1.8M7](/packages/wnx-laravel-stats)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[dcblogdev/laravel-module-generator

Generate Laravel Modules from a template.

7710.1k1](/packages/dcblogdev-laravel-module-generator)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

116.6k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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