Laravel: Access Model instance in Form Request when using Route/Model binding : <p>I have some route/model binding set up in my project for one of my models, and that works just fine. I'm able to use my binding in my route path and accept an instance of my model as a parameter to the relevant method in my controller.</p>

<p>Now I'm trying to do some work with this model, so I have created a method in my controller that accepts a Form Request so I can carry out some validation.</p>

<pre><code>public function edit(EditBrandRequest $request, Brand $brand)
{
    // ...
</code></pre>

<p>Each different instance of my model can be validated differently, so I need to be able to use an instance of the model in order to build a custom set of validation rules.</p>

<p><strong>Is there a way of getting the instance of the model, that is injected into the controller from the Form Request?</strong></p>

<p>I have tried type-hinting the model instance in the Form Request's constructor</p>

<pre><code>class EditBrandRequest extends Request
{
    public function __construct(Brand $brand)
    {
        dd($brand);
    }
</code></pre>

<p>I have also tried type-hinting the model instance in the Form Request's <code>rules()</code> method.</p>

<pre><code>class EditBrandRequest extends Request
{
    // ...

    public function rules(Brand $brand)
    {
        dd($brand);
</code></pre>

<p>In both instances I am provided an empty/new instance of the model, rather than the instance I am expecting.</p>

<p>Of course, I could always get around this by not bothering with Form Requests and just generate the rules in the controller and validate manually - but I would rather do it the <em>Laravel way</em> if it's possible.</p>

<p>Thanks</p>
