title: Is it possible to override injected Request from a Laravel Package?
body: <p>I'm building a custom package in Laravel that has a resource Controller. For this example the resource is an <code>Organization</code>  In this Controller the basic <code>index</code>, <code>show</code>, <code>store</code> etc actions are defined.</p>
  
  <p>This is my <code>store</code> method in the controller:</p>
  
  <pre class="lang-php prettyprint-override"><code>     /**
       * Store a newly created Organization in storage.
       *
       * @param  OrganizationStoreRequest  $request
       * @return JsonResponse
       */
      public function store($request): JsonResponse
      {
          $newOrganization = new Organization($request-&gt;all());
  
          if ($newOrganization-&gt;save()) {
              return response()-&gt;json($newOrganization, 201);
          }
  
          return response()-&gt;json([
              'message' =&gt; trans('organilations::organisation.store.error')
          ], 500);
      }
  </code></pre>
  
  <p>My <code>OrganzationStoreRequest</code> is pretty basic for now:</p>
  
  <pre class="lang-php prettyprint-override"><code>class OrganizationStoreRequest extends FormRequest
  {
      public function authorize(): bool
      {
          return true;
      }
  
      public function rules(): array
      {
          return [
              'name' =&gt; 'required'
          ];
      }
  }
  </code></pre>
  
  <p>The store method can be called on a API When the package is being used in a Laravel application. My problem here is that I want to give the users of my package the ability to override my <code>OrganizationStoreRequest</code> with there own requests, as they might have to use different authorize or validation methods.</p>
  
  <p>I've tried building a middleware and Binding my own instance to the <code>OrganizationStoreRequests</code> but I'm not getting the results I want.</p>
  
  <p>Is there anyway for the user of the package to be able to override the <code>OrganizationStoreRequets</code> in the controller of my package ?</p>