app/model/admin/SystemGroup.class.php
/**
     * Delete the object and its aggregates
     * @param $id object ID
     */
Delete the object and its aggregates
@param $id object ID
Delete the object and its aggregates @param $id object ID
public function delete($id = NULL)
    {
        $id = isset($id) ? $id : $this->id;
        SystemGroupProgram::where('system_group_id', '=', $id)->delete();
        SystemUserGroup::where('system_group_id', '=', $id)->delete();
        parent::delete($id);
    }
public function delete ( $ id = NULL ) { $ id = isset ( $ id ) ? $ id : $ this -> id ; SystemGroupProgram :: where ( 'system_group_id' , '=' , $ id ) -> delete ( ) ; SystemUserGroup :: where ( 'system_group_id' , '=' , $ id ) -> delete ( ) ; parent :: delete ( $ id ) ; }
Delete the object and its aggregates
 @param $id object ID
Delete the object and its aggregates @param $id object ID
// delete the related System_groupSystem_program objects // delete the object itself