Field Name | Description |
---|---|
id | int(PK) |
created_at | timestamp |
name | varchar(255) |
description | text |
status | varchar(25) |
public function hook_before_add(&$postdata) {
//For example you want to override the status field
$postdata['status'] = 'Active';
}
This method will be called once submitting a form in Create A Data.
public function hook_before_edit(&$postdata,$id) {
//For example you want to override the status field
$postdata['status'] = 'Active';
}
This method will be called once submitting a form in Update A Data.
public function hook_before_delete($id) {
//You want to delete all data of child table
DB::table('OTHER_CHILD_TABLE')->where('FOREIGN_KEY',$id)->delete();
}
This method will be called once delete button is clicked.