zezont4 / laravel-generator
Generate the main classes that laravel uses to work with database . Like model,controller,request,blade forms
Installs: 116
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Language:JavaScript
Requires
- php: ~5.5|~7.0
- laravelcollective/html: 5.2.*
README
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
- Run
composer require zezont4/LaravelGenerator
- 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, ],
- Publish assets and components files.
php artisan vendor:publish --force
- Visit (http://your_host_name/laravel_generator)
- Copy layouts files from resources/views/copy_to_layouts to resources/views/layouts.
- Copy assets files from public/copy_to_public to public root.
Credits
License
The MIT License (MIT). Please see License File for more information.