updated routing to fix several issues.
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user