photo/app/Jobs/PhotoMove.php

38 lines
647 B
PHP
Raw Normal View History

2016-06-22 21:07:44 +00:00
<?php
namespace App\Jobs;
use Log;
use App\Jobs\Job;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use App\Model\Photo;
class PhotoMove extends Job implements ShouldQueue
{
use InteractsWithQueue, SerializesModels;
private $photo;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct(Photo $photo)
{
$this->photo = $photo;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
Log::info('Moving: '.$this->photo->id);
}
}