public function action($action, $parameters = [], $absolute = true)
    {
        $getProjectConfig = Config::get('project');
        //add language if current language
        if($getProjectConfig['multilanguage'] && App::getLocale() != Language::getDefault('slug')) {
            $langParameter = array('lang'=> App::getLocale() );
        }else{
            $langParameter = array('lang'=>"");
        }

        $parameters = array_merge($langParameter, $parameters);
        $method = Theme::getNamespace().$action;
        $url = action($method, $parameters);
        return $url;
    }
public function action($action, $parameters = [], $absolute = true)
    {
        $getProjectConfig = Config::get('project');
        //add language if current language
        if($getProjectConfig['multilanguage'] && App::getLocale() != Language::getDefault('slug')) {
            $langParameter = array('lang'=> App::getLocale() );
        }else{
            $langParameter = array('lang'=>"");
        }

        $parameters = array_merge($langParameter, $parameters);
        $method = Theme::getNamespace().$action;
        $url = action($method, $parameters);
        return $url;
    }
public function action ( $ action , $ parameters = [ ] , $ absolute = true ) { $ getProjectConfig = Config :: get ( 'project' ) ; //add language if current language if ( $ getProjectConfig [ 'multilanguage' ] && App :: getLocale ( ) != Language :: getDefault ( 'slug' ) ) { $ langParameter = array ( 'lang' => App :: getLocale ( ) ) ; } else { $ langParameter = array ( 'lang' => "" ) ; } $ parameters = array_merge ( $ langParameter , $ parameters ) ; $ method = Theme :: getNamespace ( ) . $ action ; $ url = action ( $ method , $ parameters ) ; return $ url ; }
Generate the URL to a controller action, depending if url should contain language slug or not.

It uses Laravel's action method

@param  string $action     ex. PostController@single
@param  array  $parameters
@param  bool   $absolute
@return string
Generate the URL to a controller action depending if url should contain language slug or not .