title: Laravel Event: how to fire and pass value to a listener after a controller method is called
body: <p>In this case, we have 3 tables:  </p>
  
  <p><code>tasks (task_id, task_title,task_type)</code><br>
  <code>managers (manager_id, manager_title, manager_type)</code><br>
  <code>assigners (task_id, manager_id)</code></p>
  
  <p>In <code>TaskController.php</code>, I have a store method to create new task  </p>
  
  <pre><code>public function store() {  
      $input = Input::all();
      $this-&gt;task-&gt;create($input);
       return Redirect::route('tasks.index');}
  </code></pre>
  
  <p>Here's what I want to achieve: </p>
  
  <ol>
  <li>Pass the newly created task value to an event <code>task.created</code>, </li>
  <li>Compare the new task title <code>$task-&gt;task_title</code> with any <code>$manager-&gt;manager_title</code>, if any matches found (<code>$task-&gt;task_title</code> LIKE <code>$manager-&gt;manager_title</code>), then pass the matched <code>$task-&gt;task_id</code> and <code>$manager-&gt;manager_id</code> as an array to another event,</li>
  <li><p>In an event listener located in start/global, it will create new record(s) in assigners table with values received from step2.The event listener is written as below:  </p>
  
  <pre><code>Event::listen('task.created',function($param1,$param2){  
      $new_assigner = new Assigner;  
      $assigner-&gt;task_id = $param1;  
      $assigner-&gt;manager_id = $param2;  
      $new_assigner-&gt;save();  
  });
  </code></pre></li>
  </ol>
  
  <p>My questions:</p>
  
  <ol>
  <li>Where to fire the event in step 1 (in TaskController?) and what parameter should be used as a value to pass ($this->task?)</li>
  <li>How to achieve step 2? (there maybe more than one matches found)</li>
  </ol>