我在 Homestead 上使用 Laravel 5.1。我使用 Xinax/Gettext 包 ( https://github.com/xinax/laravel-gettext ) 翻译字符串。除了尝试运行包含可翻译字符串的控制台命令(例如_('Test string')
.
我得到的错误是:
[Symfony\Component\Debug\Exception\FatalErrorException]
Call to undefined function App\Console\Commands\_()
关于如何让 gettext 功能在控制台环境中工作的任何想法?