wasChanged('source_project')) { $newSource = $naksCertificate->source_project; // If the source_project is now empty (NULL or ''), it means this project effectively // took ownership or created a new version that should be treated as master. // Or if we specifically want to propagate ANY change to source_project. // The user said: "When I make 'Viksa' empty, it is saved with this project's name // and triggers others". // Assuming the "saved with this project's name" is logic handled elsewhere or implied // by it being empty (Empty = This Project). // We trigger the sync job. Log::info("NaksCertificate updated: source_project changed to '{$newSource}'. Dispatching TriggerNaksSyncJob."); TriggerNaksSyncJob::dispatch([ 'module' => 'technology', // naks_certificates corresponds to technology module 'source_project' => config('app.name', 'Unknown Project'), ]); } } }