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:
@@ -124,6 +124,11 @@ class SpatieMediaLibraryFileEntry extends Entry
|
|||||||
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();
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user