public static function getBaseUrl(array $only = ['page' => 1, 'per_page' => 20, 'priority' => null, 'search' => ''])
    {
        $request = app('request');
        $return  = [];
        foreach ($only as $name => $default) {
            array_set($return, $name, $request->get($name, $default));
        }
        $url    = self::$baseUrl;
        if (!is_null($userId = from_route('user'))) {
            $url = $url . '/' . $userId;
        }

        return $url . '?' . http_build_query($return, '', '&');
    }
public static function getBaseUrl(array $only = ['page' => 1, 'per_page' => 20, 'priority' => null, 'search' => ''])
    {
        $request = app('request');
        $return  = [];
        foreach ($only as $name => $default) {
            array_set($return, $name, $request->get($name, $default));
        }
        $url    = self::$baseUrl;
        if (!is_null($userId = from_route('user'))) {
            $url = $url . '/' . $userId;
        }

        return $url . '?' . http_build_query($return, '', '&');
    }
public static function getBaseUrl ( array $ only = [ 'page' => 1 , 'per_page' => 20 , 'priority' => null , 'search' => '' ] ) { $ request = app ( 'request' ) ; $ return = [ ] ; foreach ( $ only as $ name => $ default ) { array_set ( $ return , $ name , $ request -> get ( $ name , $ default ) ) ; } $ url = self :: $ baseUrl ; if ( ! is_null ( $ userId = from_route ( 'user' ) ) ) { $ url = $ url . '/' . $ userId ; } return $ url . '?' . http_build_query ( $ return , '' , '&' ) ; }
Base url getter

@param array $only
@return String
Base url getter