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 5
5
class ModelObserver
6
6
{
7
7
/**
8
- * Handle the created event for the model.
8
+ * Handle the saved event for the model.
9
9
*
10
10
* @param \Illuminate\Database\Eloquent\Model $model
11
11
*/
12
- public function created ($ model )
12
+ public function saved ($ model )
13
13
{
14
14
$ model ->addToHunt ();
15
15
}
16
16
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
-
27
17
/**
28
18
* Handle the deleted event for the model.
29
19
*
@@ -41,6 +31,6 @@ public function deleted($model)
41
31
*/
42
32
public function restored ($ model )
43
33
{
44
- $ this ->created ($ model );
34
+ $ this ->saved ($ model );
45
35
}
46
36
}
You can’t perform that action at this time.
0 commit comments