Configuration
Configure the preview routes and the directories scanned for messages.
The published config/message-preview.php file contains four options.
| Option | Default | Description |
|---|---|---|
enabled | true | Set to false to disable the preview. |
path | message-preview | URL prefix of the preview. |
middleware | ['web'] | Middleware applied to the preview routes. |
paths | [app_path()] | Directories scanned for messages. |
The package loads every class in paths through Composer's autoloader. To avoid loading the rest of your application, list only the directories that contain messages, such as app_path('Mail') and app_path('Notifications').
Environment variables
| Option | Environment variable |
|---|---|
enabled | MESSAGE_PREVIEW_ENABLED |