belongsToMany(Plantel::class)->withPivot('plantel_id'); } public function existe($plantelId = null) { if (!$plantelId) { return false; } return $this->turnoPlantel() ->wherePivot('plantel_id', $plantelId) ->exists(); } }