rickdbcn / filament-email Goto Github PK
View Code? Open in Web Editor NEWLog emails in your Filament project
Home Page: https://filament-email-demo.marcogermani.it/
License: MIT License
Log emails in your Filament project
Home Page: https://filament-email-demo.marcogermani.it/
License: MIT License
Would be nice to be able to delete emails manually.
Is your feature request related to a problem? Please describe.
I would like to add extra fields when logging to the database, such as the currently logged on user, etc.
Describe the solution you'd like
If I could set the FilamentEmailLogger class in the config, (the same as you've done with EmailResource), then I could add the fields required.
Describe alternatives you've considered
Alternatively you could modify your Email class to look for specific session variables, either fixed or dynamic. Eg. you could:
public function handle(object $event): void
$model::create([
...
'foreign_id' => session("filament_email_foreign_id")
You could also have an array of fields to populate in the config file?
Additional context
Thank you, for your time!
It does not look good with a transparent background. Ability to add bg-white as background.
I think using Infolist TextEntry here will be more beneficial here.
You can check on your Admin Panel
latest
v8.1.19
v10.14.0
No response
No response
Hi @RickDBCN, you can update this section?
I think can be usefull to add this description, "Log emails in your Filament project" and this tags: "php, laravel, filament, log, email"
Thanks.
Going to the view page, I expect to see a list of emails.
Config is the stock config, I added this to my Filament panel which doesn't have tenancy. I have other panels that do have tenancy, but the email logging is not in place for those.
1.3
8.3
10.48.10
Linux
Getting this error when attempting to view the emails: Column not found: 1054 Unknown column 'team_id' in 'where clause'
.
This is the query that's failing: SELECT count(*) AS aggregate FROM
filament_email_logWHERE
team_id IS NULL
.
There is not a team_id
field on the filament_email_log
table.
This was previously working, until today.
Packagist not sync with latest release
Update package
1.2.1
8.2
10
Linux
No response
Resend button, ability to resend emails
When mail notifications are sent, it's not being logged
While debugging, I do php artisan event:list --event=MessageSent
and the package's listener doesn't show
Simply follow the package's Installation instructions
1.0.11
8.2.8
10.43.0
macOS
No response
Hi @RickDBCN, i think will be nice to submit project to https://madewithlaravel.com/submit for more visibility of the Laravel community.
Ideally adding the model sending the email and the model_id would then mean we can have email transactions for the model.
I built something similar whereby we store the id and model so we can then find the transactions and render them in an action on the model record so users can easily see the status of send emails, but I took it one step further and built malign integration and a web hook so we can show status, deliveries and opens/clicks.
After composer update
today, I get the following error:
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Error
Class name must be a valid object or a string
at vendor\rickdbcn\filament-email\src\FilamentEmailServiceProvider.php:35
31▕
32▕ public function bootingPackage()
33▕ {
34▕ $this->callAfterResolving(Schedule::class, function (Schedule $schedule) {
➜ 35▕ $class = get_class(new (Config::get('filament-email.resource.model')));
36▕ if (class_exists($class)) {
37▕ $schedule->command('model:prune --model="'.$class.'"')->daily();
38▕ }
39▕ });
1 vendor\laravel\framework\src\Illuminate\Container\Container.php:1294
RickDBCN\FilamentEmail\FilamentEmailServiceProvider::RickDBCN\FilamentEmail\{closure}(Object(Illuminate\Console\Scheduling\Schedule), Object(Illuminate\Foundation\Application))
2 vendor\laravel\framework\src\Illuminate\Container\Container.php:1258
Illuminate\Container\Container::fireCallbackArray(Object(Illuminate\Console\Scheduling\Schedule))
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
composer update
1.2.0
8.2
11.4.0
Windows
No response
Here is the error: local.ERROR: Undefined array key "attachments"
Just try to click the Update and Resend email button on an email without attachments and see the internal error yourself.
1.4
8.3
10
Windows
No response
Is your feature request related to a problem? Please describe.
I need to hide menu item for some users role
Describe the solution you'd like
very basic solution I've found is to add canView method in EmailResource
es:
public static function canViewAny(): bool
{
return auth()->user()->{Config::get('filament-email.resource.canViewMethod')}();
}
And in config add the name of the method
'resource' => [
...
'canViewMethod' => 'isAdmin'
],
in User model
public function isAdmin(): bool
{
return $this->hasRole('Administrator');
}
Thanks
Cosimo
Hi @RickDBCN, please can you review NL translations for v1.3.0 publish
After running composer update, I encountered a ParseError with the message:
syntax error, unexpected identifier "filament", expecting ")"
The error traces back to vendor/rickdbcn/filament-email/src/Filament/Resources/EmailResource.php on line 34:
return __('Config::get('filament-email.label')') ?? __('Email log');
The issue seems to be with the incorrect usage of single quotes inside the translation function. Instead of evaluating the Config::get() method, it's treated as a literal string causing the syntax error.
1.0.8
8.2.10
10.30.1
Linux
A possible fix for the getNavigationLabel method is:
return __(Config::get('filament-email.label', 'Email log'));
The getNavigationGroup method has an incorrect usage of the nullish coalescing operator. The correct implementation should be:
return __(Config::get('filament-email.resource.group', parent::getNavigationGroup()));
It would be beneficial to add unit tests to catch these kinds of issues in the future.
Thank you for looking into this!
Is your feature request related to a problem? Please describe.
I always look to control access to resources/pages, Shield is what I'm currently using within Filament.
Describe the solution you'd like
The ability to enable support for Shield. For now the plugin doesn't support methods such as usingPage()
which make it easy to create an override of the default Page class where we can add the HasPageShield
Trait.
Are there better/easier approaches?
Executing the php artisan
command to publish the assets throws this error:
$ php artisan vendor:publish --tag="filament-email-migrations"
INFO Publishing [filament-email-migrations] assets.
ERROR Can't locate path: <vendor/rickdbcn/filament-email/src/../database/migrations/create_femail_table.php.stub>.
Run the php artisan
command shown above.
v1.0.1
8.2.3
10.17.1
No response
There appears to be a typo here:
->hasMigration('create_femail_table');
After running composer update
I am getting this error when accessing the main resource page for the email logs:
This is the relevant output from the composer update
command:
Upgrading rickdbcn/filament-email (v1.3.1 => v1.4.0): Extracting archive
Simply upgrade from version 1.3.1 to 1.4.0.
The config file wasn't changed, here are the contents:
<?php
// config for RickDBCN/FilamentEmail
return [
'resource' => [
'group' => 'Logs',
'sort' => null,
'default_sort_column' => 'created_at',
'default_sort_direction' => 'desc',
],
'keep_email_for_days' => 60,
'label' => null,
];
There are no pending migrations after the update.
1.4.0
8.2.15
10.48.10
Linux
The app where this happened doesn't have a team model.
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);
Hi @RickDBCN, you can add the demo link for plugin?
I don't use Shield but I use very simple laravel policies
It seems my policy is ignored and I'm not sure how to fit it
It's the first time I'm trying to use a policy on a resource coming from a plugin so I might do something wrong
1.0.10
8.2.14
10.10
macOS
No response
Is your feature request related to a problem? Please describe.
It would be nice to be able to configure the table defaultSort
through the config file
Describe alternatives you've considered
Overriding the resource would be more of hack, a config option would be nice.
Additional context
https://filamentphp.com/docs/3.x/tables/columns/getting-started#sorting-by-default
Describe the solution you'd like
It would be great to see documents that were attached to the sent email, or at least a link to them.
As stated in the discord chat a while back, the Bulk action does not delete.
I check all the emails i want to delete, choose bulk action, and then delete. i get a message saying that the records are successfully deleted. but they are not.
1.0.7
8.2.0
10.28.0
No response
No response
I cannot change the translation label on the resource page
php Action::make('preview')->label('Preview')
Should be like :
php Action::make('resend')->label(__('Send again'))
Add on my locale file the "Preview" key and nothing change
1.0.5
8.2
10
macOS, Linux
The PR is already done from my side on fork
cannot use other language menu.
just install latest version with multiple localisation
v1.0.11
8.2.12
10.39.0
macOS
public static function getNavigationGroup(): ?string
{
return __(Config::get('filament-email.resource.group' ?? parent::getNavigationGroup()));
}
Please add the resource to the config so we can extend it without problems
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.