laravel-enum
laravel-enum copied to clipboard
App breaks when using DB translation loaders in tests
Whenever a translation is used in the service provider, an app that loads translations from the DB (e.g. using spatie/laravel-translation-loader) will break, cause the database hasn't been migrated yet when the app is bootstrapped.
Steps:
- install both packages without migrating the db
- add a
/test
route:Route::get('test', function () { return 'hello'; });
- go to
/test
Illuminate\Database\QueryException SQLSTATE[42S02]: Base table or view not found: 1146 Table 'homestead.language_lines' doesn't exist (SQL: select * from `language_lines` where `group` = *)
Normally this is not an issue, because you should have the language_lines
table in the db, but it totally breaks testing.