title: Laravel listener listen to multiple event
body: <p>So according to the laravel event <a href="http://laravel.com/docs/5.1/events" rel="noreferrer">doc</a>, when defining listeners, it can receive the event instance in their handle method and perform any logic necessary:</p>
  
  <pre><code>public function handle(FoodWasPurchased $event)
  </code></pre>
  
  <p>So if my <strong>FoodWasPurchased</strong> event is defined as below (assumed EventServiceProvider is set):</p>
  
  <pre><code>public function __construct(Food $food)
  {
      $this-&gt;food = $food;
  }
  </code></pre>
  
  <p>I could access the <em>$food</em> in event from listener by doing:</p>
  
  <pre><code>$event-&gt;food-&gt;doSomething();
  </code></pre>
  
  <p>But now my question is what if a listener listen to multiple events?</p>
  
  <pre><code>Event FoodWasPurchased -&gt; Listener Bill
  Event DrinksWasPurchased -&gt; Listener Bill
  </code></pre>
  
  <p>What I did now is I did not specify the event instance in the listener handle method:</p>
  
  <pre><code>public function handle($event)
  </code></pre>
  
  <p>where I can later use an if condition to check what is received in the $event:</p>
  
  <pre><code>if (isset($event-&gt;food)) {
  
      // Do something...
  
  } elseif (isset($event-&gt;drinks)) {
  
      // Do something else...
  
  }
  </code></pre>
  
  <p>I'm sure there is a better way. </p>
  
  <p>Or the best practice is ensure that one listener only listens to one single event ?</p>