public function query($name = null, $default = null)
    {
        if ($name) {
            return $this->request->query->get($name, $default);
        }

        return $this->request->query->all();
    }
public function query($name = null, $default = null)
    {
        if ($name) {
            return $this->request->query->get($name, $default);
        }

        return $this->request->query->all();
    }
public function query ( $ name = null , $ default = null ) { if ( $ name ) { return $ this -> request -> query -> get ( $ name , $ default ) ; } return $ this -> request -> query -> all ( ) ; }
Gets all query parameters or parameter by name

If name is given but does not exist in query (GET) parameters, default value is returned

@param null|string $name
@param null|mixed $default

@return array|mixed
Gets all query parameters or parameter by name