You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: rename package from filament-mails to mails with unified namespaces
Synced from monorepo. Includes:
- Rename FilamentMails -> Mails across all classes, config, and facades
- fix: add defensive check for mail_id in download view
- fix: remove table aliasing in SuppressionResource for Filament v4
- fix: disable sorting on computed status column
- fix: styling improvements
Copy file name to clipboardExpand all lines: README.md
+30-31Lines changed: 30 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,17 @@
1
-
# Filament Mails
1
+
# Mails
2
2
3
-
[](https://packagist.org/packages/backstage/filament-mails)
[](https://packagist.org/packages/backstage/mails)
## Nice to meet you, we're [Backstage](https://backstagephp.com)
9
9
10
10
Hi! We are a web development agency from Nijmegen in the Netherlands and we use Laravel for everything: advanced websites with a lot of bells and whistles and large web applications.
11
11
12
12
## About the package
13
13
14
-
Filament Mails can collect everything you might want to track about the mails that has been sent by your Filament app. Common use cases are provided in this package:
14
+
Mails can collect everything you might want to track about the mails that has been sent by your Filament app. Common use cases are provided in this package:
15
15
16
16
- Log all sent emails with only specific attributes
17
17
- View all sent emails in the browser using the viewer
@@ -31,14 +31,14 @@ Email as a protocol is very error prone. Succesfull email delivery is not guaran
31
31
32
32
The package is built on top of [Laravel Mails](https://github.com/backstagephp/laravel-mails).
Add the routes to the PanelProvider using the `routes()` method, like this:
65
64
66
65
```php
67
-
use Backstage\FilamentMails\Facades\FilamentMails;
66
+
use Backstage\FilamentMails\Facades\Mails;
68
67
69
68
public function panel(Panel $panel): Panel
70
69
{
71
70
return $panel
72
-
->routes(fn () => FilamentMails::routes());
71
+
->routes(fn () => Mails::routes());
73
72
}
74
73
```
75
74
76
75
Then add the plugin to your `PanelProvider`
77
76
78
77
```php
79
-
use Backstage\FilamentMails\FilamentMailsPlugin;
78
+
use Backstage\FilamentMails\MailsPlugin;
80
79
81
80
public function panel(Panel $panel): Panel
82
81
{
83
82
return $panel
84
-
->plugin(FilamentMailsPlugin::make());
83
+
->plugin(MailsPlugin::make());
85
84
}
86
85
```
87
86
@@ -90,12 +89,12 @@ public function panel(Panel $panel): Panel
90
89
Using the `canManageMails()` method, you can define which users have access to the mail resources/pages. Here's a comprehensive example that includes additional logic for flexibility:
91
90
92
91
```php
93
-
use Backstage\FilamentMails\FilamentMailsPlugin;
92
+
use Backstage\FilamentMails\MailsPlugin;
94
93
use Illuminate\Support\Facades\Auth;
95
94
96
95
$panel
97
96
->plugins([
98
-
FilamentMailsPlugin::make()
97
+
MailsPlugin::make()
99
98
->canManageMails(function () {
100
99
$user = Auth::user();
101
100
@@ -122,14 +121,14 @@ This example demonstrates how to combine role-based and permission-based access
122
121
If you want to protect the mail routes with your (tenant) middleware, you can do so by adding the routes to the `tenantRoutes`:
123
122
124
123
```php
125
-
use Backstage\FilamentMails\FilamentMailsPlugin;
126
-
use Backstage\FilamentMails\Facades\FilamentMails;
124
+
use Backstage\FilamentMails\MailsPlugin;
125
+
use Backstage\FilamentMails\Facades\Mails;
127
126
128
127
public function panel(Panel $panel): Panel
129
128
{
130
129
return $panel
131
-
->plugin(FilamentMailsPlugin::make())
132
-
->tenantRoutes(fn() => FilamentMails::routes());
130
+
->plugin(MailsPlugin::make())
131
+
->tenantRoutes(fn() => Mails::routes());
133
132
}
134
133
```
135
134
@@ -138,7 +137,7 @@ public function panel(Panel $panel): Panel
138
137
139
138
### Configuration
140
139
141
-
Sometimes you want to customize the resource, like configuring which users or roles may access the resource. You can do this by overriding the `MailResource` or `EventResource` classes in the `filament-mails` config file. Make sure your custom resource extends the original resource.
140
+
Sometimes you want to customize the resource, like configuring which users or roles may access the resource. You can do this by overriding the `MailResource` or `EventResource` classes in the `mails` config file. Make sure your custom resource extends the original resource.
142
141
143
142
```php
144
143
return [
@@ -155,34 +154,34 @@ return [
155
154
### List with all sent emails and statistics
156
155
157
156
The package provides a clear overview of all emails, including statistics and the ability to filter the data.
You can view all relevant information about the email, such as the subject, the body, the attachments, the from address, the to address(es), the cc address(es), the bcc address(es), the reply to address, metadata and much more.
0 commit comments