• File: PendingClosureDispatch.php
  • Full Path: /home/masbinta/public_html/core/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingClosureDispatch.php
  • File size: 372 bytes
  • MIME-type: text/x-php
  • Charset: utf-8
<?php

namespace Illuminate\Foundation\Bus;

use Closure;

class PendingClosureDispatch extends PendingDispatch
{
    /**
     * Add a callback to be executed if the job fails.
     *
     * @param  \Closure  $callback
     * @return $this
     */
    public function catch(Closure $callback)
    {
        $this->job->onFailure($callback);

        return $this;
    }
}