İlk temizlik tamamlandı bir önceki projeden
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Observers;
|
||||
|
||||
use App\Jobs\TriggerNaksSyncJob;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class NaksConsumablesObserver
|
||||
{
|
||||
public function updated($model)
|
||||
{
|
||||
if ($model->wasChanged('source_project')) {
|
||||
Log::info("NaksConsumables updated: source_project changed. Dispatching TriggerNaksSyncJob.");
|
||||
|
||||
TriggerNaksSyncJob::dispatch([
|
||||
'module' => 'consumables',
|
||||
'source_project' => config('app.name', 'Unknown Project'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user