当中间层(hasOneThrough)有软删除时,如何获取时隙的所有关系记录。<?// other attributes are ommited {
return $this->hasOneThrough,即在center_timeslot_table中,我们就不能通过应用withTrashed()来检索模型,因为它只在直通表中的
不过,似乎没有belongsToThrough (或hasOneThrough)方法。database column in middle model that it uses to find the target model, or soemthing
return $this->hasOneThrough
我有一个简单的关系,一个亚科有许多属,每个亚科都有许多种。种通过属有一个亚科。亚科中有许多通过属的物种。* @return App\Models\Subfamily public function subfamily() return $this->hasOneThroughspecies->subfamily
BadMethodCallException with message 'Call to undefined metho