imokhles / generate-crud-command
create crud system for guards generated by iMokhles's MultiAuth package
0.1-rc2
2020-04-13 14:01 UTC
Requires
This package is auto-updated.
Last update: 2024-10-29 06:06:31 UTC
README
create crud system for guards generated by iMokhles's MultiAuth package
Install
- In your terminal via composer:
composer require imokhles/generate-crud-command
- Add this provider to your config/app.php ( no need for Laravel 5.5 and above ) :
iMokhles\IMGenerateCrudCommand\IMGenerateCrudCommandServiceProvider::class
- copy theme files to
PROJECT_DIR/public/oneui/*css,js,img,fonts
Available themes
- (NOT AVAILABLE YET) FREE AdminLTE 2
- (NOT AVAILABLE YET) FREE Tabler
- (NOT AVAILABLE YET) PAID StartUI
- (NOT AVAILABLE YET) PAID HighAdmin
- (AVAILABLE) PAID OneUI
- more comes later ( and you are welcome to send me a pull request for more themes )
Theme folder structure
.
├── Views ( folder )
│ └── THEME_NAME ( folder )
│ ├── create.blade.stub
│ ├── create_fields.blade.stub
│ ├── edit.blade.stub
│ ├── edit_fields.blade.stub
│ ├── fields
│ │ ├── checkbox.blade.stub
│ │ ├── datepicker.blade.stub
│ │ ├── datetimepicker.blade.stub
│ │ ├── email.blade.stub
│ │ ├── password.blade.stub
│ │ ├── select2.blade.stub
│ │ ├── summernote.blade.stub
│ │ ├── switch.blade.stub
│ │ ├── text.blade.stub
│ │ └── textarea.blade.stub
│ ├── index.blade.stub
│ ├── show.blade.stub
│ ├── show_fields.blade.stub
│ └── table.blade.stub
└── ...
Usage
Example usage:
php artisan make:im_crud MODEL_NAME GUARD_NAME --admin_theme="oneui" --model --migration
If you already has model and migration don't pass --model --migration options
php artisan make:im_crud MODEL_NAME GUARD_NAME --admin_theme="oneui"
Add the following to your Model if Model created manually
/** * List page index columns * * @var array */ public static $index_columns = [ ]; /** * Object creation fields * * @var array */ public static $create_fields = [ ]; /** * Object editing fields * * @var array */ public static $edit_fields = [ ]; /** * Object showing columns * * @var array */ public static $show_columns = [ ]; /** * Validation rules * * @var array */ public static $rules = [ ];
Security
If you discover any security related issues, please email imokhles@imokhles.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.