Files
api-extranetwork/app/Jobs/PropertyCatalogServiceJob.php
ExtraNetwork e5c4b6aa13 first commit
2026-05-12 17:04:54 +03:00

38 lines
782 B
PHP

<?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,
]);
}
}