Laravel-Gii visual code generation tool CRUD + GUI
GIT:https://github.com/sunshinev/laravel-gii
For fast B-side back-end development
According to MySQL table structure to generate the corresponding Model, Observer, Controller, View, Route and other associated project files, automatically create a complete CRUD background with a simple click of the mouse.
- laravel-gii
Need to know before installing
Project to Create a template need to rely on "github: laravel-fe-render " project, as a template resolution.
App.js the background page relies project to compile "github: base-fe"
installation
Installation package
Composer require sunshinev/laravel-gii -vvv
Published documents
This operation will release assets static files, to lower public directory
php artisan vendor:publish
selectTag: laravel-gii
Add Route
Route::any('/gii/model','\Sunshinev\Gii\Controllers\ModelController@index');
Route::any('/gii/crud','\Sunshinev\Gii\Controllers\CrudController@index');
Then access it
http:[domain]/gii/model
use
Creating Model Model
Form Description
- Table names (support drop-down selection)
- Model class name (you want to create a model class, include the namespace)
- The model is derived from the parent class (if it is Mongo can be inherited
Jenssegers\Mongodb\Eloquent\Model
, MySQL useIlluminate\Database\Eloquent\Model
)
A list of files generated, blue represents the new file, and red for an existing file, but there are different, white represents an existing file.
Create a CRUD
CRUD creation, need to rely on the model created previously.
This will also generate:
- route
- controller
- views
Form Description
- Controller name (include the namespace)
- Before you create the model class
Differences file compare
The final contents of the file
After you create a background page
List
The page includes the ability to:
- List
- Paging
- Retrieval
- + Delete bulk deletion
- Preview
- Detail
- edit
+ Delete bulk deletion
Cancel button to zoom in, to prevent accidental deletion
Line Preview
Edit Page
related question
- If, after completion of generation Model, the default configuration will be used in connection env, if adjustment is required, modify the Model file.