Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit abecf8f

Browse files
committedMar 3, 2025·
2 parents 9c5ec77 + 0452dfe commit abecf8f

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed
 

‎README.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,24 +61,18 @@ Optionally, you can publish the views using
6161
php artisan vendor:publish --tag="filament-mails-views"
6262
```
6363

64-
Add the routes to your `web.php` file:
64+
Add the routes to the PanelProvider using the `routes()` method, like this:
6565

6666
```php
6767
use Vormkracht10\FilamentMails\Facades\FilamentMails;
6868

69-
// Basic usage - uses default Filament panel path and name
70-
FilamentMails::routes();
71-
72-
// Prefix routes with path and/or name
73-
FilamentMails::routes(
74-
path: 'panel-path',
75-
name: 'panel-id'
76-
);
69+
public function panel(Panel $panel): Panel
70+
{
71+
return $panel
72+
->routes(FilamentMails::routes());
73+
}
7774
```
7875

79-
> [!NOTE]
80-
> By default, the path will be set to your Filament panel's path and the name will be 'filament.' followed by your panel's ID. You only need to customize these if you want different values.
81-
8276
Then add the plugin to your `PanelProvider`
8377

8478
```php
@@ -91,7 +85,7 @@ public function panel(Panel $panel): Panel
9185
}
9286
```
9387

94-
### Tenant middleware / route protection
88+
### Tenant middleware and route protection
9589

9690
If you want to protect the mail routes with your (tenant) middleware, you can do so by adding the routes to the `tenantRoutes`:
9791

0 commit comments

Comments
 (0)
Please sign in to comment.