@@ -37,46 +37,31 @@ public function create($table, Closure $callback)
37
37
{
38
38
$ blueprint = $ this ->createBlueprint ($ table , $ callback );
39
39
40
- /** @var class-string<TableCreated> $event */
41
- $ event = config ()->get ('schema-events.events.created ' );
42
-
43
- $ this ->events ->push ($ event ::from ($ this ->connection , $ blueprint ));
40
+ $ this ->events ->push (TableCreated::from ($ this ->connection , $ blueprint ));
44
41
}
45
42
46
43
public function drop ($ table )
47
44
{
48
- /** @var class-string<TableDropped> $event */
49
- $ event = config ()->get ('schema-events.events.dropped ' );
50
-
51
- $ this ->events ->push ($ event ::from ($ this ->connection , $ table ));
45
+ $ this ->events ->push (TableDropped::from ($ this ->connection , $ table ));
52
46
}
53
47
54
48
public function dropIfExists ($ table )
55
49
{
56
50
if ($ this ->hasTable ($ table )) {
57
- /** @var class-string<TableDropped> $event */
58
- $ event = config ()->get ('schema-events.events.dropped ' );
59
-
60
- $ this ->events ->push ($ event ::from ($ this ->connection , $ table ));
51
+ $ this ->events ->push (TableDropped::from ($ this ->connection , $ table ));
61
52
}
62
53
}
63
54
64
55
public function table ($ table , Closure $ callback )
65
56
{
66
57
$ blueprint = $ this ->createBlueprint ($ table , $ callback );
67
58
68
- /** @var class-string<TableChanged> $event */
69
- $ event = config ()->get ('schema-events.events.changed ' );
70
-
71
- $ this ->events ->push ($ event ::from ($ this ->connection , $ blueprint ));
59
+ $ this ->events ->push (TableChanged::from ($ this ->connection , $ blueprint ));
72
60
}
73
61
74
62
public function rename ($ from , $ to )
75
63
{
76
- /** @var class-string<TableCreated> $event */
77
- $ event = config ()->get ('schema-events.events.renamed ' );
78
-
79
- $ this ->events ->push ($ event ::from ($ this ->connection , $ from , $ to ));
64
+ $ this ->events ->push (TableRenamed::from ($ this ->connection , $ from , $ to ));
80
65
}
81
66
82
67
public function hasTable ($ table )
0 commit comments