Laravel - Queues - Manually Failing A Job

Occasionally you may need to manually mark a job as "failed". To do so, you may call the fail method:

    
    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle()
    {
        // ...
    
        $this->fail();
    }
	

If you would like to mark your job as failed because of an exception that you have caught, you may pass the exception to the fail method:

    
    $this->fail($exception);
	
For more information on failed jobs, check out the documentation on dealing with job failures.