public function delete_by_id($table, $id = 0, $field_name = 'id')
{
if ($id === 0) {
return false;
}
if (is_array($id)) {
foreach ($id as $remove) {
$c_id = $this->table($table)->where($field_name, '=', $remove)->delete();
}
} else {
$c_id = $this->table($table)->where($field_name, '=', $id)->delete();
}
Cache::tags($table)->flush();
return $c_id;
}