/** * Create a new instance of the Router class for chaining * * @return object */ public static function create() { if (Request::cli()) { // get cli arguments $args = Arr::get($_SERVER, 'argv', array()); $uri = implode('/', array_slice($args, 1)); return new static('cli', trim($uri, '/') ?: '/'); } return new static(Request::method(), Uri::current()); }
/** * Remove a item in the session * * @param string * @param mixed */ public function erase($key) { Arr::erase($this->data, $key); }