-
-
Notifications
You must be signed in to change notification settings - Fork 102
Description
Filament Version
v4.1.7
Plugin Version
v4
PHP Version
PHP 8.3
Problem description
Error:
The model [Awcodes\Curator\Models\Media] does not have a relationship named [event]. You can change the relationship being used by passing it to the [ownershipRelationship] argument of the [tenant()] method in configuration. You can change the relationship being used per-resource by setting it as the [$tenantOwnershipRelationshipName] static property on the [App\Filament\Resources\Media\MediaResource] resource class.
( event is my tenant relationship )
Expected behavior
Should work correctly with tenant enable and a custom Media model that extends the base Media model with a tenant relationship,
in the MediaResource.php file, line 24, there is this line in V4
protected static ?string $model = Media::class;
like in V3, should be ( i think ):
public static function getModel(): string { return config('curator.model'); }
Steps to reproduce
- Install curator V4 with tenancy
- enable tenancy in the curator config with the proper relationship
- Set the custom Media model auto generated by the installer in the curator config "model"
- Use the CuratorPicker
Reproduction repository
No response