title: Debugging Laravel jobs
body: <p>I am trying to debug jobs on a queue in Laravel but to no success. I want to print output into the console. Such as how you use <code>dd()</code> everywhere else.</p>
  
  <pre><code>&lt;?php
  
  namespace App\Jobs;
  
  use App\Image;
  use Illuminate\Bus\Queueable;
  use Illuminate\Queue\SerializesModels;
  use Illuminate\Queue\InteractsWithQueue;
  use Illuminate\Contracts\Queue\ShouldQueue;
  use Illuminate\Foundation\Bus\Dispatchable;
  
  class ProcessImage implements ShouldQueue
  {
      use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
  
      protected $image;
  
      /**
       * Attempt the job a maximum of twice
       *
       * @var int
       */
      public $tries = 2;
  
      /**
       * Create a new job instance.
       *
       * @return void
       */
      public function __construct(Image $image)
      {
  
          $this-&gt;image = $image;
  
      }
  
      /**
       * Execute the job.
       *
       * @return void
       */
      public function handle()
      {
          // set paths for standard and thumbnail size images
  
          $image          = public_path("assets" . DIRECTORY_SEPARATOR . $this-&gt;image-&gt;original);
          $product_id     = $this-&gt;image-&gt;id;
          $product_path   = public_path("assets" . DIRECTORY_SEPARATOR . "images" . DIRECTORY_SEPARATOR .
              "products" . DIRECTORY_SEPARATOR . $product_id);
  
  
          $thumbnail_path = $product_path . DIRECTORY_SEPARATOR . "thumbnail";
  
          if(!is_dir($product_path))
              mkdir($product_path);
  
          if(!is_dir($thumbnail_path))
              mkdir($thumbnail_path);
  
          // Resize and save the standard image
  
          $standard = \Image::make($image)-&gt;resize(450, 450, function($constraint)
          {
              $constraint-&gt;aspectRatio();
          })-&gt;save($product_path);
  
          dd($standard);
  
      }
  }
  </code></pre>