Giter Site home page Giter Site logo

mootensai / yii2-enhanced-gii Goto Github PK

View Code? Open in Web Editor NEW
201.0 36.0 100.0 437 KB

Enhanced Yii2 Gii (generator) that generates related Models & CRUD

License: MIT License

PHP 100.00%
generator php-framework yii2 yii2-extension php gii crud model scaffolding

yii2-enhanced-gii's Introduction

yii2-enhanced-gii

Yii2 Gii (generator) with Relation

Latest Stable Version License Total Downloads Monthly Downloads Daily Downloads Join the chat at https://gitter.im/mootensai/yii2-enhanced-gii Yii2

Support

Support via Gratipay

https://www.paypal.me/yohanesc

Endorse me on LinkedIn

https://www.linkedin.com/in/yohanes-candrajaya-b68394102/

Installation

The preferred way to install this extension is through composer.

Either run

$ composer require mootensai/yii2-enhanced-gii:dev-master
$ composer require kartik-v/yii2-mpdf:dev-master # if you want to use pdf exporter 
$ composer require kartik-v/yii2-tree-manager:dev-master # if you want to use tree/nested relation table

or add

"mootensai/yii2-enhanced-gii": "dev-master",
"kartik-v/yii2-mpdf": "dev-master",
"kartik-v/yii2-tree-manager": "dev-master"

add "kartik-v/yii2-mpdf": "dev-master", if you want to use pdf exporter

add "kartik-v/yii2-tree-manager": "dev-master", if you want to use tree/nested relation table

to the require section of your composer.json file.

I separate the mpdf & tree-manager because the package is big & not everyone will use it.

Then you must add this code at your config\main.php.

'modules' => [
... //your another module
      'gridview' => [
          'class' => '\kartik\grid\Module',
          // see settings on http://demos.krajee.com/grid#module
      ],
      'datecontrol' => [
          'class' => '\kartik\datecontrol\Module',
          // see settings on http://demos.krajee.com/datecontrol#module
      ],
      // If you use tree table
      'treemanager' =>  [
          'class' => '\kartik\tree\Module',
          // see settings on http://demos.krajee.com/tree-manager#module
      ]
... // your another module
    ],

See gridview settings on http://demos.krajee.com/grid#module

See datecontrol settings on http://demos.krajee.com/datecontrol#module

See treemanager settings on http://demos.krajee.com/tree-manager#module (If you use tree/nested relation table)

Usage :

Go to your gii tools, and notice the new IO Generator for models & CRUD

Features

Model :

  1. Generate optimistic lock
  2. Generate Timestamp Behaviors
  3. Generate Blameable Behavior
  4. Generate UUID Behavior
  5. Generate Soft Delete Behavior (NEW! Todo : Generate data filtering for relation data, e.g. not show deleted children of hasMany )

CRUD :

  1. Generate all CRUD with wildcard (*) of table
  2. Generate related input output
  3. Specify your name/label attribute for foreign keys
  4. Set your column to hidden
  5. Specify your skipped columns
  6. Specify your skipped relations
  7. Set pluralize or not
  8. PDF Printable view
  9. Expandable / collapsible row at index grid view for related data

Migration Generator :

  1. Generate migration from your database structure (based on : https://github.com/deesoft/yii2-gii)
  2. Option to generate with safeUp() and safeDown()

To Do

  1. One-page-CRUD template
  2. Implement generator for Soft Delete Behavior (https://github.com/yii2tech/ar-softdelete)

I'm open for any improvement

Screenshot

Model Generator

enhanced gii - model

CRUD Generator

enhanced gii - crud

Index

Grid View

enhanced gii - index grid

List View

enhanced gii - index list

View

enhanced gii - view

Form

enhanced gii - create

enhanced gii - update

Nested / Tree

enhanced gii - nested

Migration Generator

migration form

Thanks To

  1. Jiwanndaru ([email protected]) for creating the tradition
  2. kartik-v (https://github.com/kartik-v) for most of widgets
  3. schmunk42 (https://github.com/schmunk42) for bootstrap & model base & extension
  4. mdmunir (https://github.com/mdmunir) for JsBlock & Migration Generator (from https://github.com/deesoft/yii2-gii)

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.