/home/techb158/ileadtechnology.com/vendor/spatie/laravel-query-builder/src
NameSizeModeActions
Concerns/-0755rm
Enums/-0755rm
Exceptions/-0755rm
Filters/-0755rm
Includes/-0755rm
Sorts/-0755rm
AllowedFilter.php36190644editdlrm
AllowedInclude.php25260644editdlrm
AllowedSort.php22150644editdlrm
QueryBuilder.php36910644editdlrm
QueryBuilderRequest.php32980644editdlrm
QueryBuilderServiceProvider.php9030644editdlrm
Edit: /home/techb158/ileadtechnology.com/vendor/spatie/laravel-query-builder/src/AllowedInclude.php (2526B)
name = Str::camel($name); $this->includeClass = $includeClass; $this->internalName = $internalName ?? $this->name; } public static function relationship(string $name, ?string $internalName = null): Collection { $internalName = Str::camel($internalName ?? $name); return IncludedRelationship::getIndividualRelationshipPathsFromInclude($internalName) ->zip(IncludedRelationship::getIndividualRelationshipPathsFromInclude($name)) ->flatMap(function ($args): Collection { [$relationship, $alias] = $args; $includes = collect([ new self($alias, new IncludedRelationship, $relationship), ]); if (! Str::contains($relationship, '.')) { $suffix = config('query-builder.count_suffix'); $includes = $includes->merge(self::count( $alias.$suffix, $relationship.$suffix )); } return $includes; }); } public static function count(string $name, ?string $internalName = null): Collection { return collect([ new static($name, new IncludedCount(), $internalName), ]); } public function include(QueryBuilder $query): void { if (property_exists($this->includeClass, 'getRequestedFieldsForRelatedTable')) { $this->includeClass->getRequestedFieldsForRelatedTable = function (...$args) use ($query) { return $query->getRequestedFieldsForRelatedTable(...$args); }; } ($this->includeClass)($query->getEloquentBuilder(), $this->internalName); } public function getName(): string { return $this->name; } public function isForInclude(string $includeName): bool { return $this->name === $includeName; } }