['required'], ]); if ($validator->fails()) { return $validator->errors()->first(); } } return true; } /** * 删除的前置方法 * * @param array $ids 主键id * @return mixed true: 继续后续操作, string: 中断操作, 返回错误提示 */ public function preDelete(array $ids) { return true; } }