(1/1) BadMethodCallExceptionExample code:
Method locate does not exist.
in Macroable.php (line 74)
at Translator->__call('locate', array())
in Facade.php (line 221)
at Facade::__callStatic('locate', array())
use Lang;Since there is a bit strange and i almost can't find anyone with this strange case on internet,
class OrderService
{
protected $lang;
public function __construct() {
$this->lang = Lang::locate();
}
}
using "Config::get('app.locale');" to replace Lang::locate(); works.
use Config;
class OrderService
{
protected $lang;
public function __construct() {
$this->lang = Config::get('app.locale');
}
}
No comments :
Post a Comment