---
title: "Laravel 13: How to Dispatch Multiple Jobs Using Bus::bulk()"
url: "https://magecomp.com/blog/laravel-13-dispatch-multiple-jobs-using-busbulk/"
date: "2026-08-26T10:33:56+00:00"
modified: "2026-08-26T10:33:58+00:00"
author:
  name: "Bharat Desai"
  url: "https://magecomp.com"
categories:
  - "Laravel"
word_count: 819
reading_time: "5 min read"
summary: "This blog post will talk about the Bus::bulk utility of Laravel 13 for dispatching a number of jobs. Instead of dispatching jobs one by one, Bus::bulk allows the dispatching of jobs in bulk, which ..."
description: "Learn how to dispatch multiple jobs efficiently using Bus::bulk() in Laravel 13. Follow this step-by-step guide."
keywords: "Laravel"
language: "en"
schema_type: "Article"
related_posts:
  - title: "How to Use ApexCharts in Laravel 11 with Larapex Charts?"
    url: "https://magecomp.com/blog/apexcharts-laravel-11-with-larapex-charts/"
  - title: "How to Install Laravel 10 using Composer"
    url: "https://magecomp.com/blog/install-laravel-10-using-composer/"
  - title: "Laravel: How to Add Form Validation in the Request Controller"
    url: "https://magecomp.com/blog/laravel-add-form-validation-in-the-request-controller/"
---

# Laravel 13: How to Dispatch Multiple Jobs Using Bus::bulk()

_Published: August 26, 2026_  
_Author: Bharat Desai_  

![Laravel 13 How to Dispatch Multiple Jobs Using Busbulk()](https://magecomp.com/blog/wp-content/uploads/2026/08/Laravel-13-How-to-Dispatch-Multiple-Jobs-Using-Busbulk-1024x512.webp)

This blog post will talk about the Bus::bulk utility of Laravel 13 for dispatching a number of jobs. Instead of dispatching jobs one by one, Bus::bulk allows the dispatching of jobs in bulk, which is helpful while processing several queued processes or background jobs like sending notifications, processing users, generating reports, and other activities.

[![](https://magecomp.com/blog/wp-content/uploads/2024/12/Laravel-Development-Services-1-1024x284.webp)](https://magecomp.com/services/laravel-development-services/)

## Prerequisite:
1. Composer (latest Version)

2. Laravel version 13

Here are the steps to follow:

Step 1: Install Laravel 13

Step 2: Create Job

Step 3: Create Controller

Step 4: Create Routes

Step 5: Dispatch Multiple Jobs Using Bus::bulk()

Step 6: Configure Queue

Step 7: Test Project

Now, let’s see all the steps with the detailed information.

## Steps to Dispatch Multiple Jobs Using Bus::bulk() in Laravel 13:
### Step 1: Install Laravel 13
We need a new project for this demo. Create it using the command below:

```
composer create-project laravel/laravel:^13.0 bulk-job-demo
```

### Step 2: Create Job
Here, we will create the ProcessUserJob. Use the command below to create the job.

```
php artisan make:job ProcessUserJob
```

Now open the following file:

**app/Jobs/ProcessUserJob.php**

You need to add below code:

```
<?php
namespace AppJobs;
use IlluminateContractsQueueShouldQueue;
use IlluminateFoundationQueueQueueable;
class ProcessUserJob implements ShouldQueue
{
    use Queueable;
    public function __construct(
        public int $userId
    ) {
    }
    /**
     * Execute the job.
     */
    public function handle(): void
    {
        logger("User {$this->userId} processed successfully.");
    }
}
```

The ProcessUserJob has been created, which takes in the user ID; while executing the job, it writes a message into the log file of Laravel.

### Step 3: Create Controller
Here, we will create UserController. To do this, please run the command below.

```
php artisan make:controller UserController
```

Open the following file:

**app/Http/Controllers/UserController.php**

Add the following code:

```
<?php
namespace AppHttpControllers;
use AppJobsProcessUserJob;
use IlluminateSupportFacadesBus;
class UserController extends Controller
{
    /**
     * Dispatch multiple user jobs.
     */
    public function processUsers()
    {
        $jobs = [];
        for ($userId = 1; $userId <= 5; $userId++) {
            $jobs[] = new ProcessUserJob($userId);
        }
        Bus::bulk($jobs);
        return "All jobs dispatched successfully.";
    }
}
```

Here, we create multiple ProcessUserJob instances and store them in the $jobs array.

After creating all the jobs, we use:

```
Bus::bulk($jobs);
```

This makes it possible for Laravel to dispatch the jobs at once.

### Step 4: Create Routes
At this point, create a route to dispatch the jobs.

To open:

**routes/web.php**

Next, enter the following code:

```
<?php
use IlluminateSupportFacadesRoute;
use AppHttpControllersUserController;
Route::get('/process-users', [UserController::class, 'processUsers']);
```

### Step 5: Dispatch Multiple Jobs Using Bus::bulk()
This is where we will learn to use Bus::bulk().

We can create multiple jobs like this:

```
$jobs = [
    new ProcessUserJob(1),
    new ProcessUserJob(2),
    new ProcessUserJob(3),
    new ProcessUserJob(4),
    new ProcessUserJob(5),
];
Bus::bulk($jobs);
```

Here, the above code sends five jobs at once.

We can also create jobs dynamically using a loop:

```
$jobs = [];
for ($userId = 1; $userId <= 100; $userId++) {
    $jobs[] = new ProcessUserJob($userId);
}
Bus::bulk($jobs);
```

This is a perfect solution when you have to send a great number of jobs.

For instance, instead of doing this:

```
foreach ($userIds as $userId) {
    ProcessUserJob::dispatch($userId);
}
```

We can use:

```
$jobs = [];
foreach ($userIds as $userId) {
    $jobs[] = new ProcessUserJob($userId);
}
Bus::bulk($jobs);
```

With Bus::bulk(), Laravel can gather the jobs according to their queue and connection for bulk queue insertion.

### Step 6: Configure Queue
Go to .env file and open it:

.env

Set the queue connection to the database:

```
QUEUE_CONNECTION=database
```

After this, make jobs’ table with the following command:

```
php artisan make:queue-table
```

Run the migration:

```
php artisan migrate
```

Now, start the Laravel queue worker:

```
php artisan queue:work
```

The queue worker will process the jobs that were dispatched using Bus::bulk()

### Step 7: Test Project
Now, let’s run the Laravel application.

```
php artisan serve
```

Then go to your browser and enter this URL:

http://127.0.0.1:8000/process-users

You will see the following response:

All jobs dispatched successfully.

The five jobs are in the queue now.

The queue worker will process each job.

Open the following file:

**storage/logs/laravel.log**

You will see entries similar to the following:

User 1 processed successfully.

User 2 processed successfully.

User 3 processed successfully.

User 4 processed successfully.

User 5 processed successfully.

This proves that all jobs are properly delivered through Bus::bulk() and worked on by the worker for Laravel.

## Conclusion
In this post, we have described how to utilize the Bus::bulk() method in Laravel 13 in order to process different tasks.

The Bus::bulk() function is required in the case of bulk job dispatching, as it considerably reduces the process of putting jobs in the queue.

[![](https://magecomp.com/blog/wp-content/uploads/2024/12/Hire-Laravel-Expert-Now-1-1024x284.webp)](https://magecomp.com/services/hire-laravel-developer/)

## FAQ
**1. What is Bus::bulk() in Laravel 13?**

Bus::bulk() is a function that Laravel provides for dispatching job batches grouped by their queue.

**2. What is the Bus::bulk() syntax?**

The standard syntax is:

```
Bus::bulk([
    new ProcessUserJob(1),
    new ProcessUserJob(2),
    new ProcessUserJob(3),
]);
```

You can also create an array of jobs dynamically and provide it to Bus::bulk().

**3. Is Bus::bulk() more efficient than sending jobs one by one?**

If you have a lot of independent jobs, it is more efficient to use Bus::bulk() since jobs get combined.


---

_View the original post at: [https://magecomp.com/blog/laravel-13-dispatch-multiple-jobs-using-busbulk/](https://magecomp.com/blog/laravel-13-dispatch-multiple-jobs-using-busbulk/)_  
_Served as markdown by [Third Audience](https://github.com/third-audience) v3.5.3_  
_Generated: 2026-08-26 13:32:35 UTC_  
