Installation
Install Laravel Message Preview and publish its assets.
Requirements
Laravel Message Preview requires PHP 8.4 or later and Laravel 12 or 13.
Install the package
Install the package with Composer:
bash
composer require hosmelq/laravel-message-preview --devPublish the frontend assets:
bash
php artisan vendor:publish --tag="message-preview-assets"The assets must be published again after every update. To do it automatically, add the command to the post-update-cmd scripts of your composer.json:
json
"post-update-cmd": [
"@php artisan vendor:publish --tag=message-preview-assets --ansi --force"
]Publish the configuration
Publish the configuration file to change the defaults:
bash
php artisan vendor:publish --tag="message-preview-config"See configuration for the available options.