File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,22 @@ public function setTables($tables)
162
162
return $ this ;
163
163
}
164
164
165
+ /**
166
+ * @return BaseHelper
167
+ */
168
+ public function setAllTablesFromDatabase ()
169
+ {
170
+ $ columnName = 'Tables_in_ ' .env ('DB_DATABASE ' );
171
+
172
+ $ this ->loopThrough (
173
+ $ this ->getAllTablesFromDatabase ()->getSavedItems (),
174
+ function ($ key , $ item ) use ($ columnName ) {
175
+ $ this ->setTables ($ item ->$ columnName );
176
+ });
177
+
178
+ return $ this ;
179
+ }
180
+
165
181
/**
166
182
* @return string
167
183
*/
@@ -354,7 +370,7 @@ public function executeAll($callback = null)
354
370
public function executeWithoutPrepare ()
355
371
{
356
372
try {
357
- $ this ->executeAll (function (){
373
+ $ this ->executeAll (function () {
358
374
DB ::unprepared ($ this ->getQuery ());
359
375
});
360
376
@@ -456,5 +472,7 @@ public function done()
456
472
public function getAllTablesFromDatabase ()
457
473
{
458
474
$ this ->setSavedItems (DB ::select ('SHOW TABLES ' ));
475
+
476
+ return $ this ;
459
477
}
460
478
}
You can’t perform that action at this time.
0 commit comments