We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2aa6e77 commit e593600Copy full SHA for e593600
src/ModelObserver.php
@@ -5,25 +5,15 @@
5
class ModelObserver
6
{
7
/**
8
- * Handle the created event for the model.
+ * Handle the saved event for the model.
9
*
10
* @param \Illuminate\Database\Eloquent\Model $model
11
*/
12
- public function created($model)
+ public function saved($model)
13
14
$model->addToHunt();
15
}
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
28
* Handle the deleted event for the model.
29
@@ -41,6 +31,6 @@ public function deleted($model)
41
31
42
32
public function restored($model)
43
33
44
34
+ $this->saved($model);
45
35
46
36
0 commit comments