application/models/Servicelog_model.php
/**
     * Deletes a service log and its child records
     * 
     * @param type $servicelog_id
     * @return type
     */
Deletes a service log and its child records

@param type $servicelog_id
@return type
Deletes a service log and its child records @param type $servicelog_id @return type
public function deleteServiceLogAndChildren($servicelog_id) {
        try {
            $servicelog = R::load('servicelog', $servicelog_id);
            R::trash($servicelog);
        } catch (Exception $ex) {
            return ['success' => false, 'message' => $ex->getMessage()];
        }
        return ['success' => true, 'message' => 'Deleted records successfully.'];
    }
public function deleteServiceLogAndChildren ( $ servicelog_id ) { try { $ servicelog = R :: load ( 'servicelog' , $ servicelog_id ) ; R :: trash ( $ servicelog ) ; } catch ( Exception $ ex ) { return [ 'success' => false , 'message' => $ ex -> getMessage ( ) ] ; } return [ 'success' => true , 'message' => 'Deleted records successfully.' ] ; }
Deletes a service log and its child records
Deletes a service log and its child records