44 lines
833 B
PHP
44 lines
833 B
PHP
<?php
|
|
|
|
namespace App\Jobs;
|
|
|
|
use App\Models\Media;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Foundation\Bus\Dispatchable;
|
|
use Illuminate\Queue\InteractsWithQueue;
|
|
use Illuminate\Queue\SerializesModels;
|
|
use Illuminate\Support\Facades\Storage;
|
|
|
|
class ProcessMedia implements ShouldQueue
|
|
{
|
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
|
|
|
/**
|
|
* File path
|
|
*
|
|
* @var String
|
|
*/
|
|
public $file;
|
|
|
|
/**
|
|
* Create a new job instance.
|
|
*
|
|
* @param String $file The file path
|
|
*/
|
|
public function __construct(string $file)
|
|
{
|
|
$this->file = $file;
|
|
}
|
|
|
|
/**
|
|
* Execute the job.
|
|
*/
|
|
public function handle(): void
|
|
{
|
|
if(Storage::disk('temp')->exists($this->media->name)) {
|
|
|
|
}
|
|
}
|
|
}
|