我在覆盖Laravel Backpack中的destroy()方法时遇到问题。当我尝试做更多事情时,例如使用cURL调用我的entryCRUD的destroy()方法内部的API的外部方法,它将停止工作(并且没有返回错误)。
<?php
public function destroy($id)
{
$this->crud->hasAccessOrFail('delete');
$customer = Customer::find($id);
$array_api_user_options = AdminUserJsonRepositoryData::deleteArrayData();
$array_api_user_options['mail'] = $customer->email;
$array_api_user_options['ke'] = $customer->api_group_key;
$array_api_user_options['uid'] = $customer->api_user_id;
// Instancia o Shinobi com token e group key
$apiShinobi = New ShinobiAPIRepositoryAPI($customer->api_auth_token, $customer->group_key, $customer->user_id);
$apiShinobi->deleteAdminUser(json_encode($array_api_user_options));
return $this->crud->delete($id);
}
当我删除行:$apiShinobi->deleteAdminUser()
时,它将再次起作用并删除我的记录。有人可以帮我吗?