Skip to content

Instantly share code, notes, and snippets.

@mumin91
Created September 1, 2018 16:49
Show Gist options
  • Select an option

  • Save mumin91/901b1b802ac5bdf47bd0031980ae6ecf to your computer and use it in GitHub Desktop.

Select an option

Save mumin91/901b1b802ac5bdf47bd0031980ae6ecf to your computer and use it in GitHub Desktop.
<?php
namespace App\Jobs;
use App\Podcast;
use App\AudioProcessor;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
class ProcessPodcast implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
protected $podcast;
/**
* Create a new job instance.
*
* @param Podcast $podcast
* @return void
*/
public function __construct(Podcast $podcast)
{
$this->podcast = $podcast;
}
/**
* Execute the job.
*
* @param AudioProcessor $processor
* @return void
*/
public function handle(AudioProcessor $processor)
{
// Process uploaded podcast...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment