Laravel Horizon provides a beautiful dashboard and code-driven configuration for your Laravel powered Redis queues. It makes job processing in PHP and it is one of the reasons why it is so popular.
In this tutorial, we will show you a quick way to test out if Laravel Horizon is set up correctly.
First thing first, create a testing job that is a "mailable" class.
php artisan make:mail MailableTest --markdown=emails.mailable-test
Next, let's send the mailable class to the queue.
$mailable = (new \App\Mail\MailableTest())->onQueue('default'); Mail::to('email@example.com')->queue($mailable);
Now open the Horizon dashboard at
https://your-app/horizon in your browser, you should be able to see a completed job in the dashboard: