/** * 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()); }
/** * Get a item from the session * * @param string * @param mixed */ public function get($key, $fallback = null) { return Arr::get($this->data, $key, $fallback); }