title: Laravel. Pass parameters to an event subscriber
body: <p>Im developing a task system and i want to mark as viewed a task and do other things when a user request the task</p>
  
  <p>I wrote a Task Event Subscriber like this</p>
  
  <pre><code>&lt;?php namespace Athena\Events;
  
  class TaskEventSubscriber {
  
  
      public function onCreate($event)
      {
         // Here we can send a lot of emails
      }
  
  
      public function onUpdate($event)
      {
          \Log::info('This is some useful information.');
      }
  
      public function onShow($event)
      {
          \Log::info('The view event is now triggerd ');
      }
  
  
      public function subscribe($events)
      {
          $events-&gt;listen('user.create', 'Athena\Events\TaskEventSubscriber@onCreate');
  
          $events-&gt;listen('user.update', 'Athena\Events\TaskEventSubscriber@onUpdate');
  
          $events-&gt;listen('task.show', 'Athena\Events\TaskEventSubscriber@onShow');
      }
  }
  </code></pre>
  
  <p>And my controller I fire the event like this:</p>
  
  <pre><code>public function show($id)
  {
      $canView = $this-&gt;canView($id);
      if($canView !== true)
      {
          return $canView;
      }
  
      $task = $this-&gt;task-&gt;byId($id);
      // We fire the showed event
      $this-&gt;events-&gt;fire('task.show', $this-&gt;task);
      return View::make('tasks.show')
          -&gt;with('task', $task);
  }
  </code></pre>
  
  <p>But i dont know how can I or I should catch a parameter to be used inside of the event</p>
  
  <p>By the way my Task Event subscriber is register on this Service Provider</p>
  
  <pre><code>class AthenaServiceProvider extends ServiceProvider {
  
      public function register()
      {
          // A lot of stuffs
      }
  
      public function boot()
      {
          \Event::subscribe('Athena\Events\UserEventSubscriber');
          \Event::subscribe('Athena\Events\TaskEventSubscriber');
      }
  </code></pre>
  
  <p>}</p>
  
  <p>If you need more information just let me know, Thnks in advance</p>