first commit
This commit is contained in:
37
app/Jobs/PropertyCatalogServiceJob.php
Normal file
37
app/Jobs/PropertyCatalogServiceJob.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
class PropertyCatalogServiceJob extends Job
|
||||
{
|
||||
protected $propertyId;
|
||||
protected $language;
|
||||
protected $email;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*/
|
||||
public function __construct($propertyId, $language, $email = null)
|
||||
{
|
||||
$this->propertyId = $propertyId;
|
||||
$this->language = $language;
|
||||
$this->email = $email;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
chdir(base_path());
|
||||
|
||||
Artisan::call('cron:property-catalog-service', [
|
||||
'property_id' => $this->propertyId,
|
||||
'language' => $this->language,
|
||||
'--email' => $this->email,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user