samedi 28 novembre 2015

Laravel 5.1 with gettext gives undefined function _() in console commands

I'm using Laravel 5.1 on Homestead. I translate strings with the Xinax/Gettext package (http://ift.tt/1Ngew03). It all works perfectly except for when trying to run a console command containing translatable strings, for example _('Test string').

The error I get is:

[Symfony\Component\Debug\Exception\FatalErrorException]  
Call to undefined function App\Console\Commands\_()

Any ideas on how to get the gettext functionality to work in the console environment?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire