Carlos
Get Collection from related model using Spatie Media Library plugin
I found the answer, defining a Fieldset component with a relationship changes the scope of the $record, i.e.:
[ RoomResource form ]
...
Fieldset::make('hotel')
->relationship('hotel')
->schema([
SpatieMediaLibraryFileUpload::make('hotel_photos')
->collection('hotel_photos'),
])
...
3 replies