title: Laravel custom validation - get parameters
body: <p>I want to get the parameter passed in the validation rule.</p>
  
  <p>For certain validation rules that I have created, I'm able to get the parameter from the validation rule, but for few rules it's not getting the parameters.</p>
  
  <p>In model I'm using the following code:</p>
  
  <pre><code>public static $rules_sponsor_event_check = array(
      'sponsor_id' =&gt; 'required',
      'event_id' =&gt; 'required|event_sponsor:sponsor_id'
  );
  </code></pre>
  
  <p>In ValidatorServiceProvider I'm using the following code:</p>
  
  <pre><code>    Validator::extend('event_sponsor', function ($attribute, $value, $parameters) {
          $sponsor_id = Input::get($parameters[0]);
          $event_sponsor = EventSponsor::whereIdAndEventId($sponsor_id, $value)-&gt;count();
  
          if ($event_sponsor == 0) {
              return false;
          } else {
              return true;
          }
      });
  </code></pre>
  
  <p>But here I'm not able to get the sponsor id using the following:</p>
  
  <pre><code>$sponsor_id = Input::get($parameters[0]);
  </code></pre>