Пример #1
0
 /**
  * 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());
 }
Пример #2
0
 /**
  * Remove a item in the session
  *
  * @param string
  * @param mixed
  */
 public function erase($key)
 {
     Arr::erase($this->data, $key);
 }