create job for nikarayan
This commit is contained in:
34
app/Jobs/UpdateRoadObservedInfoByNikarayanJob.php
Normal file
34
app/Jobs/UpdateRoadObservedInfoByNikarayanJob.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
use App\Models\RoadObserved;
|
||||
use App\Services\NikarayanService;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use SoapFault;
|
||||
|
||||
class UpdateRoadObservedInfoByNikarayanJob implements ShouldQueue
|
||||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
public $queue = 'nikarayan';
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*/
|
||||
public function __construct(public Request $request, public RoadObserved $roadObserved, public $files) {}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
* @throws SoapFault
|
||||
*/
|
||||
public function handle(NikarayanService $nikarayanService): void
|
||||
{
|
||||
$nikarayanService->updateRoadObservedInfoByNikarayan($this->request, $this->roadObserved, $this->files);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user