0

我需要从我的 LeadRepository 类中显示一个潜在客户注册。

   use Illuminate\Support\Facades\DB;

   public function show(Lead $lead)
    {
        try {
            return DB::table('leads')->find($lead->id);
        } catch (Exception $exception) {
            return $this->exceptionJson($exception);
        }
    }

但我得到的只是这个错误:

TypeError: Argument 1 passed to Symfony\Component\HttpFoundation\Response::setContent() must be of the type string or null, object given, called in C:\xampp\htdocs\novosimuladornewsun\api\vendor\laravel\framework\src\Illuminate\Http\Response.php on line 72 in file C:\xampp\htdocs\novosimuladornewsun\api\vendor\symfony\http-foundation\Response.php on line 412
4

0 回答 0