Database: return empty collection when language does not exist on getSingleTranslationsFor a given language, to avoid operation on null.
Among other things, this avoids errors through third-party packages that call translations during artisan migrate and before the actual laravel-translation migrations have run - else we experience a fatal error that effectively prevents migration and causes all kinds of trouble on automated deployment systems.
This particular error came to light when attempting to set the driver to database on an existing Laravel project that included rinvex/countries and then running migrations.
Database: return empty collection when language does not exist on getSingleTranslationsFor a given language, to avoid operation on null.
Among other things, this avoids errors through third-party packages that call translations during artisan migrate and before the actual laravel-translation migrations have run - else we experience a fatal error that effectively prevents migration and causes all kinds of trouble on automated deployment systems.
This particular error came to light when attempting to set the driver to database on an existing Laravel project that included
rinvex/countries
and then running migrations.