PHPackages                             hazicms/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. hazicms/generator

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

hazicms/generator
=================

Generator for HaziCms.

v1.0.3(11y ago)549GPL-3.0PHPPHP &gt;=5.4.0

Since Apr 21Pushed 10y ago1 watchersCompare

[ Source](https://github.com/hazicms/generator)[ Packagist](https://packagist.org/packages/hazicms/generator)[ Docs](https://github.com/hazicms/generator)[ RSS](/packages/hazicms-generator/feed)WikiDiscussions master Synced 1mo ago

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

Steps to Get Started
--------------------

[](#steps-to-get-started)

1. Add this package to your composer.json:

    ```
     "require": {
         "pingpong/generators": "2.0.*@dev",
         "pingpong/modules": "2.0.x-dev",
         "hazicms/generator": "1.0.x"
     }

    ```
2. Run composer update

    ```
     composer update

    ```
3. Add the ServiceProviders to the providers array in `config/app.php`.

    ```
     'Laracasts\Flash\FlashServiceProvider',
     'Mitul\Generator\GeneratorServiceProvider',
     'Pingpong\Modules\ModulesServiceProvider',
     'Pingpong\Modules\Providers\BootstrapServiceProvider',
     'HaziCms\Generator\Generator\GeneratorServiceProvider',
     'Collective\Html\HtmlServiceProvider',
     'Intervention\Image\ImageServiceProvider',

    ```

    Also for convenience, add these facades in alias array in `config/app.php`.

    ```
     'Module'=> 'Pingpong\Modules\Facades\Module',
     'Form' => 'Collective\Html\FormFacade',
     'Html' => 'Collective\Html\HtmlFacade',
     'Flash' => 'Laracasts\Flash\Flash',
     'Image' => 'Intervention\Image\Facades\Image'

    ```
4. Publish config files for generators, modules and images:

    ```
     php artisan vendor:publish --provider="HaziCms\Generator\Generator\GeneratorServiceProvider"

     php artisan vendor:publish

     php artisan vendor:publish --provider="Intervention\Image\ImageServiceProviderLaravel5"

    ```
5. Modify `modules.php` file to your needs.On Cms, change 'namespace' =&gt; 'HaziCms\\Modules', and 'modules' =&gt; app\_path('Modules').
6. Modify `generator.php` file to your needs.
7. Add ADMIN-LTE dashboard template: cd public &amp;&amp; bower update &amp;&amp; cd ..
8. Add bower dependencies (at least CKEditor): cd vendor/hazicms/generator/ &amp;&amp; bower update &amp;&amp; cd ..
9. Fire artisan command to generate module with model.

    ```
     php artisan hazicms:generator ModuleName ModelName

    ```

    e.g.

    ```
     php artisan hazicms:generator Network Project
     php artisan hazicms:generator Blog Post

    ```
10. Enter the fields with options

    fieldName:fieldType\[,htmlAtribute1 ,htmlAtribute2\]:\[fieldData\]:\[defaultOption\]

    Examples:

    ```
    Select: group:select,'id' => 'mySelect', 'class' => 'red':['admin' => 'admin','user' => 'user']:user
    Select (data from model): role_id:select,'id' => 'mySelect', 'class' => 'red'  //to run well, need the fathers model created. Role for this example
    Text: title:text,'size' => 255
    Hidden: user_id:hidden,'id'=> 'user_id' // if the name ends with '_id', we suppose that the value is the model id. // Else value is null
    Float: price:float,'min' => 1, 'max' => 10
    Textarea: body:textarea,'placeholder' => 'Body content' (make ```bower install``` inside generator folder)
    Radiobutton: sex:radio,'id' => 'sex', 'class' => 'red':['male' => 'ale','female' => 'fem']:fem
    Checkbutton: data:check,'id' => 'data', 'class' => 'red':['clean_the_room' => 'clean','go_to_your_home' => 'home']:home (*)
    Number: assistance:number,'id' => 'assistance', 'class' => 'red'
    Date: birthday:date,'id' => 'date', 'class' => 'red' (make ```bower install``` inside generator folder)

    ```

    There are some basic field examples on field\_example\_data file.

(\*) Need to uncomment 3 lines on the modules controller to run. Laravelcollective/form has a bug with checkboxes. Until this been solved, this trick is needed! :-( If you see "preg\_replace(): Parameter mismatch, pattern is a string while replacement is an array" error, you need to read the last sentece. :-)

12. (optional) If you want, you can add auth middleware to module routes. Route::group(\['prefix' =&gt; 'admin', 'middleware' =&gt; 'auth') ...
13. Go to [http://domain.com/admin/\[Plural's](http://domain.com/admin/%5BPlural's) ModelName\] :)

Use ROXY fileman\[0\] as a filebrowser for CKEditor
---------------------------------------------------

[](#use-roxy-fileman0-as-a-filebrowser-for-ckeditor)

1. Download fileman for PHP, unzip on public folder and give permissions.
2. Add on: /public/theme/ckeditor/config.js

    ```
     var roxyFileman = '/fileman/index.html';
     config.filebrowserBrowseUrl = roxyFileman;
     config.filebrowserImageBrowseUrl = roxyFileman+'?type=image';
     config.removeDialogTabs = 'link:upload;image:upload';

    ```
3. On public/fileman/conf.json change INTEGRATION to "ckeditor".

\[0\]

Use outsite of HaziCms namespace
--------------------------------

[](#use-outsite-of-hazicms-namespace)

1. php artisan app:name `your_namespace`.
2. Set on `config/generator.php` file, `namespace` variable to `your_namespace`.

Credits
-------

[](#credits)

This module generator is created by [Aitor Ibañez](https://github.com/aitiba).

This package is based on [laravel-api-generator](https://github.com/mitulgolakiya/laravel-api-generator).

**Bugs &amp; Forks are welcomed :)**

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

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

Total

5

Last Release

4018d ago

Major Versions

v0.9 → v1.02015-05-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/172c6ac4a6f60efd28179ff052d96d224fe9665610c2b85006772e92794a2aa4?d=identicon)[aitiba](/maintainers/aitiba)

---

Top Contributors

[![aitorjs](https://avatars.githubusercontent.com/u/1209012?v=4)](https://github.com/aitorjs "aitorjs (112 commits)")

---

Tags

apilaravelmigrationgeneratorscaffoldmodelcmscrud

### Embed Badge

![Health badge](/badges/hazicms-generator/health.svg)

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

###  Alternatives

[infyomlabs/laravel-generator

InfyOm Laravel Generator

3.8k2.3M13](/packages/infyomlabs-laravel-generator)

PHPackages © 2026

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