updated routing to fix several issues.

This commit is contained in:
Taylor Otwell
2012-02-12 14:48:36 -06:00
parent 31cf44c374
commit 3a92facc76
31 changed files with 960 additions and 772 deletions

View File

@@ -40,6 +40,26 @@ class Event {
static::$events[$event][] = $callback;
}
/**
* Fire an event and return the first response.
*
* <code>
* // Fire the "start" event
* $response = Event::first('start');
*
* // Fire the "start" event passing an array of parameters
* $response = Event::first('start', array('Laravel', 'Framework'));
* </code>
*
* @param string $event
* @param array $parameters
* @return mixed
*/
public static function first($event, $parameters = array())
{
return head(static::fire($event, $parameters));
}
/**
* Fire an event so that all listeners are called.
*