quickframe / quickadmin
管理包
dev-master
2021-09-28 14:08 UTC
Requires
- php: >=7.2.5
- laravel/framework: >=7.0
- proengsoft/laravel-jsvalidation: ^4.0
This package is auto-updated.
Last update: 2024-09-28 20:40:52 UTC
README
Quick Building Admin Data Managment.
# Define Common Form Design
# Define Common List Design
# Four Stage
List, Create, Edit, Search
构建构建器
You can bind controller and model. You must be inherited from QuickBuilder and QuickModel.
One Builder represents ListPage,CreatePage,EditPage.
There is declare which column are included.
Builder File must be exist under app\Builder.
After Creation of Build, you can get simple 4stage(CRUD);
see documentation [here](./Builder.md)
QuickBuilder 控制器
getFileName() - Loading Related File.Default load from route segment 2
getListData(Request $request) - Return Builder for listing data.
创建的默认 QuickBuilder 逻辑
store(Request $request) - action for store data
createRule() - Return rule for create from file.
beforeSave($model) - to action on model before save
saveLogic($model) - to save model logic
prepareRelateionStore($relationObj, $currentModel, $relatedData) - Preparing for some relation data
beforeSaveRelated($relatedData, $currentModelId)
saveLogicRelated($relationObj, $currentModel, $relatedData)
afterSaveRelated($relatedData, $currentModelId)
afterSave($model)
编辑的默认 QuickBuilder 逻辑
editRule() - Return rule array from edit from file
列
name attribute for
setValue accept callback function to override original value
visible attribute to define which column are need to show in what stage.
there is four stage list,create,edit,search
列功能
getValueAccessable
This method is use to change user data to database assignable data
getValueUserable
This method is use to change database data to userdata
bindSearchLogic
This method is use to bind search logic.If you build new column type, you should bind your search logic.
列类型
integer,date,text,select
列关系
Defining Name at relation attribute
关系
关系类型
hasOne, hasMany, BelongsTo, BelongsToMany
Depends of Type, there is require attriubtes are change.