Open SabatinoMasala opened 4 years ago
The table name returned by $model->getTable() is unprefixed, causing errors on the describe query if a table prefix is present.
$model->getTable()
describe
https://github.com/mtolhuys/laravel-schematics/blob/c69a2e85687443c691ed8bd79d88d2f61eafc0b1/src/Http/Controllers/ModelsController.php#L59
https://github.com/mtolhuys/laravel-schematics/blob/c69a2e85687443c691ed8bd79d88d2f61eafc0b1/src/Http/Controllers/ModelsController.php#L60
This could be solved by adding the prefix manually:
$safeTableName = \DB::getQueryGrammar()->wrap($model->getConnection()->getTablePrefix() . $table);
I had this issue occur on an older Laravel version: 5.7
Not tested on anything newer.
Hi @SabatinoMasala,
Thnx for the suggestion! I'll try it out in my environments and take it along with the next release.
The table name returned by
$model->getTable()
is unprefixed, causing errors on thedescribe
query if a table prefix is present.https://github.com/mtolhuys/laravel-schematics/blob/c69a2e85687443c691ed8bd79d88d2f61eafc0b1/src/Http/Controllers/ModelsController.php#L59
https://github.com/mtolhuys/laravel-schematics/blob/c69a2e85687443c691ed8bd79d88d2f61eafc0b1/src/Http/Controllers/ModelsController.php#L60
This could be solved by adding the prefix manually:
I had this issue occur on an older Laravel version: 5.7
Not tested on anything newer.