You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.0 KiB

<?php
/**
* 预约车位(课程)
*/
namespace App\Jobs;
use App\Models\Course;
use App\Repositories\CarRepository;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
class SendCourseCar implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public $tries = 3;
public $courseSignsModel;
public $palte;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct($courseSignsModel, $palte)
{
$this->courseSignsModel = $courseSignsModel;
$this->palte = $palte;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
$carRepository = new CarRepository();
$course = Course::find($this->courseSignsModel->course_id);
$carRepository->courseAppointment($course, $this->courseSignsModel, $this->palte, $out);
}
}