Closed Jacobtims closed 8 months ago
I want to override the default Mail model class because I use tenancy in my application. I would like to have a similar option in the config, as the override for the Filament EmailResource class. Something like this:
Mail
EmailResource
<?php // config for RickDBCN/FilamentEmail return [ 'resource' => [ 'class' => \App\Filament\Resources\EmailResource::class, 'model' => \App\Models\Email::class, ], ];
I now need to force override it in my AppServiceProvider register() method, which is not a nice way:
AppServiceProvider
register()
$loader = AliasLoader::getInstance(); $loader->alias(\RickDBCN\FilamentEmail\Models\Email::class, \App\Models\Email::class);
Hi Jacob,
Great idea! I'll probably get this sorted next week.
If you can find time to PR this in the mean time, that would be highly appreciated. Otherwise I'll do it somewhere next week.
I want to override the default
Mail
model class because I use tenancy in my application. I would like to have a similar option in the config, as the override for the FilamentEmailResource
class. Something like this:I now need to force override it in my
AppServiceProvider
register()
method, which is not a nice way: