Request::getLocale PHP Method

getLocale() public static method

Get the locale.
public static getLocale ( ) : string
return string
        public static function getLocale()
        {
            //Method inherited from \Symfony\Component\HttpFoundation\Request
            return \Illuminate\Http\Request::getLocale();
        }

Usage Example

Example #1
0
 public function dispatch($options)
 {
     $locale = strtoupper($this->request->getLocale());
     $methodName = sprintf('%s%s', 'isValid', $locale);
     if (method_exists($this, $methodName)) {
         return call_user_func(array($this, $methodName), $options);
     }
     return true;
 }