SnapShooter Backups Server, Database, Application and Laravel Backups - Get fully protected with SnapShooter

Quick way to test out Laravel Horizon setup

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.

Create a testing job

First thing first, create a testing job that is a "mailable" class.

php artisan make:mail MailableTest --markdown=emails.mailable-test

Sending the mail via queue

Next, let's send the mailable class to the queue.

$mailable = (new \App\Mail\MailableTest())->onQueue('default');
Mail::to('no-reply@carlite.com.sg')->queue($mailable);

Verify if Laravel Horizon is working

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: