Download the PHP package hazicms/generator without Composer

On this page you can find all versions of the php package hazicms/generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package generator

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 .

    '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 .

    '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 file to your needs.On Cms, change 'namespace' => 'HaziCms\Modules', and 'modules' => app_path('Modules').

  6. Modify file to your needs.

  7. Add ADMIN-LTE dashboard template: cd public && bower update && cd ..

  8. Add bower dependencies (at least CKEditor): cd vendor/hazicms/generator/ && bower update && 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  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  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. :-)

  1. (optional) If you want, you can add auth middleware to module routes. Route::group(['prefix' => 'admin', 'middleware' => 'auth') ...

  2. Go to http://domain.com/admin/[Plural's ModelName] :)

Use ROXY fileman[0] 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] http://www.roxyfileman.com/CKEditor-file-browser

Use outsite of HaziCms namespace

  1. php artisan app:name .

  2. Set on file, variable to .

Credits

This module generator is created by Aitor Ibañez.

This package is based on laravel-api-generator.

Bugs & Forks are welcomed :)


All versions of generator with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
pingpong/modules Version 2.0.*@dev
mitulgolakiya/laravel-api-generator Version 1.3.*
laravelcollective/html Version ~5.0
intervention/image Version ~2.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hazicms/generator contains the following files

Loading the files please wait ...