zezont4/laravel-generator

Generate the main classes that laravel uses to work with database . Like model,controller,request,blade forms
121
Install
composer require zezont4/laravel-generator
Latest Version:0.5.5
License:MIT
Last Updated:Mar 20, 2024
Links: GitHub  ·  Packagist
Maintainer: zezont4

Laravel 5 Generator

Latest Version on Packagist Software License

Requirements

PHP >= 5.5.9
Laravel >=5.2
Auto Loaded : [laravelcollective/html package for form & html](https://laravelcollective.com/docs/5.2/html)

HOW IT WORKS ?

Select your MySql table then Laravel Generator will generate :

-Model. -Controller. -Request. -Forms (index "with filters and sorting",search,show,edit,create) using Materialize Css. -Auto generated Routs and language array.

It's a little bit smart , So it will do the following:

-Field comment in database will be the Label , if not exists thin the field name. -If type of field is TINYINT(1) then the Input type will be Radio (Optional). -If the field does not allow Null then it will be required in the request. -if field is set to be unique in database the a unique validation will be set. -if type of field is int the a numeric validation will be set.

You can configure the models path and messages and buttons labels by changing them in (config/zlg.php) file.

You can customize fields template by changing them in (resources/views/zezont4/components/form).

For security , It only works if APP_ENV=local in .env file.

Installation

  1. Run
    composer require zezont4/LaravelGenerator
  1. Add service provider & Aliases to /config/app.php file.
    'providers' => [
        \\ Other Providers,
        Zezont4\LaravelGenerator\LaravelGeneratorServiceProvider::class,
        Collective\Html\HtmlServiceProvider::class,
    ],

    'aliases' => [
        \\ Other Aliases,
        'Form' => Collective\Html\FormFacade::class,
        'Html' => Collective\Html\HtmlFacade::class,
    ],
  1. Publish assets and components files.
    php artisan vendor:publish --force
  1. Visit (http://your_host_name/*laravel_generator*)
  2. Copy layouts files from resources/views/copy_to_layouts to resources/views/layouts.
  3. Copy assets files from public/copy_to_public to public root.

Credits

License

The MIT License (MIT). Please see License File for more information.