We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52633ca commit 7e56460Copy full SHA for 7e56460
src/Concerns/HasMedia.php
@@ -84,6 +84,13 @@ public function getMedia(
84
->values();
85
}
86
87
+ public function hasMedia(
88
+ ?string $collectionName = null,
89
+ ?string $collectionGroup = null
90
+ ): bool {
91
+ return $this->getMedia($collectionName, $collectionGroup)->isNotEmpty();
92
+ }
93
+
94
/**
95
* @return TMedia
96
*/
src/Contracts/InteractWithMedia.php
@@ -41,6 +41,11 @@ public function getMedia(
41
?string $collectionGroup = null
42
): Collection;
43
44
45
46
47
+ ): bool;
48
49
50
* @return ?TMedia
51
0 commit comments