Protoqol / Prequel

Prequel for Laravel. Clear and concise database management. Unfortunately, not actively maintained due to time constraints.
https://packagist.org/packages/protoqol/prequel
MIT License
1.54k stars 96 forks source link

Solving the problem of table prefix error reporting #75

Closed xiaoxuan6 closed 4 years ago

xiaoxuan6 commented 5 years ago

PR Naming convention

[FEATURE/FIX/REFACTOR/README] Your PR

Solving the problem of table prefix error reporting

Issue or feature explanation

SQLSTATE[42S02]: Base table or view not found: 1146 Table 't_t_ecrm.t_address' doesn't exist (SQL: select count(*) as aggregate from t_t_ecrm.t_address)

Proposed solution/change

   if(config('database.connections.mysql.prefix'))
    {
        config(['database.connections.mysql.prefix' => '']);
        \Illuminate\Support\Facades\DB::purge();
    }