fix the issue with the previous commit. event was called before the labels attached to a cycle.

This commit is contained in:
Moradi
2025-03-12 16:42:00 +03:30
parent 5fe7474227
commit 034000bcef
3 changed files with 5 additions and 10 deletions
-10
View File
@@ -15,16 +15,6 @@ class Cycle extends Model
'date', 'user_id', 'cycle_number', 'sterilizer_id', 'note', 'verified', 'unique_id'
];
protected static function booted()
{
static::created(function ($cycle) {
event(new CycleSaved($cycle));
});
static::updated(function ($cycle) {
event(new CycleSaved($cycle));
});
}
public function user(): BelongsTo
{