Laravel 5 - Conditional statements within FormRequest rules
<p>Using Laravel 5.0, within a form request, validation rules can be made as such:</p>

<pre><code>class MyCustomRequest extends Request {
    public function authorize()
    {
        return Auth::check();
    }


    public function rules()
    {
        $rules = [
            'title' =&gt; 'required|max:255',
        ];

        return $rules;
    }
}
</code></pre>

<p>How do I create a rule that tests a conditional statement such as:</p>

<pre><code>'user_id' === \Auth::id();
</code></pre>

<p>where user_id is an item from the requests parameter bag</p>