Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to override the default Mail model class #30

Closed
Jacobtims opened this issue Dec 15, 2023 · 1 comment
Closed

Option to override the default Mail model class #30

Jacobtims opened this issue Dec 15, 2023 · 1 comment

Comments

@Jacobtims
Copy link
Contributor

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:

<?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:

$loader = AliasLoader::getInstance();
$loader->alias(\RickDBCN\FilamentEmail\Models\Email::class, \App\Models\Email::class);
@RickDBCN
Copy link
Owner

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.

Repository owner deleted a comment Jan 2, 2024
@RickDBCN RickDBCN closed this as completed Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants