File tree 3 files changed +11
-3
lines changed
3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -171,7 +171,6 @@ public function getResource()
171
171
*/
172
172
public function remove ($ restorable = true )
173
173
{
174
-
175
174
//translate model data to sql data
176
175
if (is_null ($ this ->schema )) {
177
176
throw Exception::forNoSchema ();
Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ function ($relation) {
181
181
182
182
try {
183
183
//remove table
184
- $ results = $ systemSql ->remove ($ data , $ restorable );
184
+ $ results = $ systemSql ->remove ($ restorable );
185
185
} catch (\Exception $ e ) {
186
186
return $ response ->setError (true , $ e ->getMessage ());
187
187
}
Original file line number Diff line number Diff line change 16
16
/**
17
17
* A helper to manage the schema file system
18
18
*/
19
- $ package ->addMethod ('schema ' , function ($ path , array $ data = null ) {
19
+ $ package ->addMethod ('schema ' , function ($ path , $ data = null ) {
20
20
static $ cache = [];
21
21
22
22
//determine file path
33
33
}
34
34
}
35
35
36
+ //if data is false
37
+ if ($ data === false ) {
38
+ //they want to remove the cache
39
+ $ data = $ cache [$ path ];
40
+ unset($ cache [$ path ]);
41
+ //return the data
42
+ return $ data ;
43
+ }
44
+
36
45
if (is_null ($ data )) {
37
46
//return the data
38
47
return $ cache [$ path ];
You can’t perform that action at this time.
0 commit comments