|
| 1 | +--- |
| 2 | +title: Installation | 4.x |
| 3 | +description: Modern self-hosted email marketing platform built specifically for Filament Admin Panel with subscriber management, email campaigns, and automation features. |
| 4 | +lastUpdated: 2026-03-03T05:10:19.253Z |
| 5 | +--- |
| 6 | + |
| 7 | +# Installation |
| 8 | + |
| 9 | + |
| 10 | +### Version Compatibility |
| 11 | + |
| 12 | +| Filament Version | Filament Newsletter Version | |
| 13 | +|------------------|---------------------------| |
| 14 | +| v3.x | v1.x – v3.x | |
| 15 | +| v4.x | v4.x | |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +You can install the package via composer: |
| 20 | + |
| 21 | +```bash |
| 22 | +composer require solution-forest/filament-newsletter |
| 23 | +``` |
| 24 | + |
| 25 | + |
| 26 | +You can register this plugin and its widgets through your panel provider: |
| 27 | + |
| 28 | +```php |
| 29 | +public function panel(Panel $panel): Panel |
| 30 | +{ |
| 31 | + return $panel |
| 32 | + ->widgets([ |
| 33 | + \SolutionForest\FilamentNewsletter\Filament\Widgets\Dashboard\TotalSubscribers::class, |
| 34 | + \SolutionForest\FilamentNewsletter\Filament\Widgets\Dashboard\CompletedCampaigns::class, |
| 35 | + \SolutionForest\FilamentNewsletter\Filament\Widgets\Dashboard\RecentSubscribers::class, |
| 36 | + ]) |
| 37 | + ->plugins([ |
| 38 | + \SolutionForest\FilamentNewsletter\FilamentNewsletterPlugin::make() |
| 39 | + ]); |
| 40 | +} |
| 41 | +``` |
| 42 | + |
| 43 | +You can publish and run the migrations with: |
| 44 | + |
| 45 | +```bash |
| 46 | +php artisan vendor:publish --tag="filament-newsletter-migrations" |
| 47 | +php artisan migrate |
| 48 | +``` |
| 49 | + |
| 50 | +You can publish the config file with: |
| 51 | + |
| 52 | +```bash |
| 53 | +php artisan vendor:publish --tag="filament-newsletter-config" |
| 54 | +``` |
| 55 | + |
| 56 | +Optionally, you can publish the views using |
| 57 | + |
| 58 | +```bash |
| 59 | +php artisan vendor:publish --tag="filament-newsletter-views" |
| 60 | +``` |
| 61 | + |
| 62 | +## Running the queue without Laravel Horizon |
| 63 | +If you don't want to use Horizon to manage you redis queue or you're using the database driver you will have to run a queue worker for each queue that Filaletter uses. |
| 64 | + |
| 65 | +default: processes default queues |
| 66 | +sendportal-message-dispatch: dispatches messages to the email service |
| 67 | +sendportal-webhook-process: processes incoming webhooks |
| 68 | +```php |
| 69 | +php artisan queue:work |
| 70 | +php artisan queue:work --queue=sendportal-message-dispatch |
| 71 | +php artisan queue:work --queue=sendportal-webhook-process |
| 72 | +``` |
| 73 | + |
| 74 | +You may also run a single worker with processing priority: |
| 75 | + |
| 76 | +```php |
| 77 | +php artisan queue:work --queue=default,sendportal-message-dispatch,sendportal-webhook-process |
| 78 | +``` |
| 79 | + |
| 80 | +## Running Redis Queues With Laravel Horizon |
| 81 | +SendPortal bundles Laravel Horizon as an easy way to run and manage redis queues. |
| 82 | + |
| 83 | +Configuration for the queues necessary to run SendPortal is already included. In order to use Horizon as your queue manager, you should first publish the Horizon assets: |
| 84 | + |
| 85 | +```php |
| 86 | +php artisan horizon:publish |
| 87 | +``` |
| 88 | +To start processing your queue items with Horizon, you simply need to run the following command: |
| 89 | + |
| 90 | +```php |
| 91 | +php artisan horizon |
| 92 | +``` |
| 93 | + |
| 94 | +## Running the Scheduler Locally |
| 95 | + |
| 96 | +```php |
| 97 | +php artisan schedule:work |
| 98 | +``` |
| 99 | + |
| 100 | +## Support for SQLite |
| 101 | + |
| 102 | +To use this package with SQLite, the following code could be added to AppServiceProvider: |
| 103 | + |
| 104 | +```php |
| 105 | +if (DB::connection() instanceof SQLiteConnection) { |
| 106 | + DB::connection()->getPdo()->sqliteCreateFunction('date_format', function ($date, $format) { |
| 107 | + return date($format, strtotime($date)); |
| 108 | + }, 2); |
| 109 | + |
| 110 | + DB::connection()->getPdo()->sqliteCreateFunction('FROM_UNIXTIME', function ($unixtime) { |
| 111 | + return date('Y-m-d H:i:s', $unixtime); |
| 112 | + }, 1); |
| 113 | + |
| 114 | + DB::connection()->getPdo()->sqliteCreateFunction('UNIX_TIMESTAMP', function ($date) { |
| 115 | + return strtotime($date); |
| 116 | + }, 1) |
| 117 | +} |
| 118 | +``` |
| 119 | + |
| 120 | + |
0 commit comments