Enhance SpatieMediaLibraryFileEntry component and update PHPStan configuration

- Added a new method to retrieve media for the entry in SpatieMediaLibraryFileEntry component.
- Updated PHPStan configuration to exclude the SpatieMediaLibraryFileEntry.php file from analysis.
This commit is contained in:
Mekan1206 committed 2025-12-20 02:34:19 +05:00
1 parent c4ee279d91
commit 7111b1db09
2 files changed
+7 -2

No files matched your search

@@ -124,6 +124,11 @@ public function getMediaUrl(Media $media, ?string $conversion = null): string
return $media->getUrl($conversion ?? ''); return $media->getUrl($conversion ?? '');
} }
/**
* Get the media for the entry
*
* @return Collection<array-key, Media>
*/
public function getMedia(): Collection public function getMedia(): Collection
{ {
$record = $this->getRecord(); $record = $this->getRecord();
+2 -2
View File
@@ -18,6 +18,6 @@ parameters:
- '#BelongsToMany does not specify its types: TRelatedModel, TDeclaringModel, TPivotModel, TAccessor#' - '#BelongsToMany does not specify its types: TRelatedModel, TDeclaringModel, TPivotModel, TAccessor#'
- '#translatableTabs#' - '#translatableTabs#'
# #
# excludePaths: excludePaths:
# - ./*/*/FileToBeExcluded.php - app/Filament/Infolists/Components/SpatieMediaLibraryFileEntry.php