Documentation Index
Fetch the complete documentation index at: https://docs.eloquentfiltering.com/llms.txt
Use this file to discover all available pages before exploring further.
Definition
Filter::morphRelation('imageable', [FilterType::DOESNT_HAS_MORPH],
Filter::morphType('*'),
);
Array/Object Structure
Example
$filter = [
'target' => 'imageable',
'type' => '$doesntHasMorph',
'types' => [
[
'type' => '*',
'value' => [],
],
],
];
$sql = Image::filter([$filter])->toRawSql();
SQL
SELECT *
FROM "images"
WHERE (
(
"images"."imageable_type" = 'articles'
AND NOT EXISTS (
SELECT *
FROM "articles"
WHERE "images"."imageable_id" = "articles"."id"
)
)
OR (
"images"."imageable_type" = 'user_profiles'
AND NOT EXISTS (
SELECT *
FROM "user_profiles"
WHERE "images"."imageable_id" = "user_profiles"."id"
)
)
)
Modifiers
None available.