Skip to content

Commit

Permalink
Add broadcast method to trait.
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Jan 13, 2017
1 parent 9fde549 commit 0fd8f8d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Illuminate/Foundation/Events/Dispatchable.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,14 @@ public static function dispatch()
{
return event(new static(...func_get_args()));
}

/**
* Broadcast the event with the given arguments.
*
* @return \Illuminate\Broadcasting\PendingBroadcast
*/
public static function broadcast()
{
return broadcast(new static(...func_get_args()));
}
}

0 comments on commit 0fd8f8d

Please sign in to comment.