protected function isNested($name, $relation) { $dots = Str::contains($name, '.'); return $dots && Str::startsWith($name, $relation . '.'); }