Skip to content

Latest commit

 

History

History
42 lines (36 loc) · 1.53 KB

how-to-make-graded-module.md

File metadata and controls

42 lines (36 loc) · 1.53 KB

How To Make A Graded Module (Parent Module -> Sub Module -> Sub Module)

Albums Table

Field Name Data Type
id int(PK)
created_at timestamp
name varchar(255)
description varchar(255)

Photos Table

Field Name Data Type
id int(PK)
created_at timestamp
name varchar(255)
photo varchar(255)
albums_id int(11)

Code

$this->sub_module[] = ['label'=>'Photos','path'=>'photos','parent_columns'=>'name,description','foreign_key'=>'albums_id','button_color'=>'success','button_icon'=>'fa fa-bars'];

image

Legend

Attribute Name Description
label Specify the label of sub module
path Specify the module path (slug)
parent_columns Specify the parent fields in this case Album Fields that you want to show. Sparate it with comma
foreign_key Specify the Foreign Key Field of photos table
button_color Specify the color of button (primary,warning,success,info)
button_icon Specify the icon. You can find out at Font Awesome
custom_parent_id Specify the id field.
custom_parent_alias Specify the field alias.

What's Next

Table Of Contents