title: How to pass parameters in Laravel Rule?
body: <p>I would like to move this code to the App\Rule:</p>
  
  <pre><code>//Currently in class AppServiceProvider extends ServiceProvider
  
  Validator::extend('empty_if', function ($attribute, $value, $parameters, $validator) {
     return ($value != '' &amp;&amp; request($parameters[0]) != '') ? false : true;
  });
  </code></pre>
  
  <p>So that it should be this: </p>
  
  <pre><code>//in: App\Rules\EmptyIf
  
  public function passes($attribute, $value, $parameters)
  {
     return ($value != '' &amp;&amp; request($parameters[0]) != '') ? false : true;
  }
  </code></pre>
  
  <p>But my problem is, that I cannot pass $parameters with</p>
  
  <pre><code>Validator::extend('empty_if', 'App\Rules\EmptyIf@passes');
  </code></pre>
  
  <p>How would you pass parameters to Laravel Rule?</p>