123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- namespace App\Observers;
- use App\Models\Plan;
- class PlanObserver
- {
- /**
- * Handle the Plan "created" event.
- */
- public function created(Plan $plan): void
- {
- //
- }
- /**
- * Handle the Plan "updated" event.
- */
- public function updated(Plan $plan): void
- {
- //
- }
- /**
- * Handle the Plan "deleted" event.
- */
- public function deleting(Plan $plan): void
- {
- $plan->requirements()->update(['plan_id' => null]);
- $plan->projects()->detach();
- }
- /**
- * Handle the Plan "deleted" event.
- */
- public function deleted(Plan $plan): void
- {
- }
- /**
- * Handle the Plan "restored" event.
- */
- public function restored(Plan $plan): void
- {
- //
- }
- /**
- * Handle the Plan "force deleted" event.
- */
- public function forceDeleted(Plan $plan): void
- {
- //
- }
- }
|