Skip to content

hedeqiang/laravel-gii

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel-Gii visual code generation tool CRUD + GUI

中文文档支持 README_zh_CN

GIT:https://github.com/sunshinev/laravel-gii

Suitable for fast B-side background development

According to the MySQL table structure, the corresponding project files such as Model, Observer, Controller, View, and Route are generated, and the complete CRUD background can be automatically created by simply clicking the mouse.

image

Installation

Installation package

composer require sunshinev/laravel-gii -vvv

Publishing files

This operation will release the assets static file to the public directory

php artisan vendor:publish

select Tag: laravel-gii

Then visit

http:[domain]/gii/model

Use

Creating a Model Model

Form Description

  1. Table name (supports drop-down selection)
  2. Model class name (want to create a model class, including the namespace)
  3. The parent class of the model inheritance (if Mongo can inherit Jenssegers\Mongodb\Eloquent\Model, MySQL uses Illuminate\Database\Eloquent\Model)

A list of generated files, blue for new files, red for existing files but different, white for existing files.

image

Create CRUD

CRUD creation depends on the model created before.

This operation will be generated at the same time:

  • route
  • controller
  • views

Form Description

  1. Controller name (including namespace)
  2. The previously created model class

image

File Difference Comparison

image

Final file content

image

Create a post page

List

This page contains the ability:

  • list
  • Pagination
  • Search
  • delete + batch delete
  • preview
  • Details
  • Edit

image

Delete + Batch Delete

Cancel button to prevent accidental deletion

image

Row preview

image

Edit page

image

related question

  1. If the Model is generated, the default configuration will be used in env. If you need to adjust, please modify the Model file.

Need to know

The template generated by the project creation needs to rely on the [github:laravel-fe-render] (https://github.com/sunshinev/laravel-fe-render) project as a template parsing.

The background page depends on the compiled app.js ["github:base-fe"] (https://github.com/sunshinev/base-fe)

About

Laravel-Gii visual code generation tool CRUD + GUI

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 97.8%
  • PHP 1.4%
  • HTML 0.8%