Code Monkey home page Code Monkey logo

imgeneratecrudcommand's Introduction

IMGenerateCrudCommand

Latest Version on Packagist Scrutinizer Code Quality Build Status Total Downloads Software License

create crud system for guards generated by iMokhles's MultiAuth package

Install

  1. In your terminal via composer:
composer require imokhles/generate-crud-command
  1. Add this provider to your config/app.php ( no need for Laravel 5.5 and above ) :
iMokhles\IMGenerateCrudCommand\IMGenerateCrudCommandServiceProvider::class
  1. 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 [email protected] instead of using the issue tracker.

Credits

License

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

Beerpay Beerpay

imgeneratecrudcommand's People

Contributors

imokhles avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.