File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed
Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change 55class ModelObserver
66{
77 /**
8- * Handle the created event for the model.
8+ * Handle the saved event for the model.
99 *
1010 * @param \Illuminate\Database\Eloquent\Model $model
1111 */
12- public function created ($ model )
12+ public function saved ($ model )
1313 {
1414 $ model ->addToHunt ();
1515 }
1616
17- /**
18- * Handle the updated event for the model.
19- *
20- * @param \Illuminate\Database\Eloquent\Model $model
21- */
22- public function updated ($ model )
23- {
24- $ this ->created ($ model );
25- }
26-
2717 /**
2818 * Handle the deleted event for the model.
2919 *
@@ -41,6 +31,6 @@ public function deleted($model)
4131 */
4232 public function restored ($ model )
4333 {
44- $ this ->created ($ model );
34+ $ this ->saved ($ model );
4535 }
4636}
You can’t perform that action at this time.
0 commit comments