Ejemplo n.º 1
0
 /**
  * Add necessary where restrictions
  *
  * @param  string  $pattern
  * @param  array   $options
  * @return void
  */
 private function addWhere($pattern, $options)
 {
     if ($options['check'] !== false) {
         preg_match_all('#\\{(\\w+)\\}#', $pattern, $matches);
         foreach ($matches[0] as $key => $value) {
             $this->route = $this->route->where(str_replace(array('{', '}'), '', $value), $this->whereRegex($options['check']));
         }
     }
 }