title: How to set custom response for selected Request class in Laravel 5.5
body: <p>I'm trying to use Laravel validation to generate custom error message, however I'm unable to find the function I should be overriding.</p>
  
  <p>Route: <code>POST:/entries/</code> uses <code>EntryController@store</code> which uses <code>EntryStoreRequest</code> to perform validation.</p>
  
  <p><strong>EntryStoreRequest</strong></p>
  
  <pre><code>namespace App\Api\V1\Requests;
  
  class EntryStoreRequest extends ApiRequest
  {
      /**
       * Get the validation rules that apply to the request.
       *
       * @return array
       */
      public function rules()
      {
          return [
              'message' =&gt; [
                  'string',
                  'required',
                  'max:65535',
              ],
              'code' =&gt; [
                  'string',
                  'max:255',
                  'nullable'
              ],
              'file' =&gt; [
                  'string',
                  'max:255',
                  'nullable'
              ],
              'line' =&gt; [
                  'string',
                  'max:255',
                  'nullable'
              ],
              'stack' =&gt; [
                  'string',
                  'max:65535',
                  'nullable'
              ]
          ];
      }
  }
  </code></pre>
  
  <p><strong>ApiRequest</strong></p>
  
  <pre><code>namespace App\Api\V1\Requests;
  
  use Illuminate\Foundation\Http\FormRequest;
  
  abstract class ApiRequest extends FormRequest
  {
      /**
       * Determine if the user is authorized to make this request.
       *
       * @return bool
       */
      public function authorize()
      {
          return true;
      }
  }
  </code></pre>
  
  <p>The errors are currently returned as:</p>
  
  <pre><code>{
      "message": "The given data was invalid.",
      "errors": {
          "message": [
              "The message field is required."
          ]
      }
  }
  </code></pre>
  
  <p>I want to format them as:</p>
  
  <pre><code>{
      "data": [],
      "meta: {
          "message": "The given data was invalid.",
          "errors": {
              "message": [
                  "The message field is required."
              ]
          }
  }
  </code></pre>
  
  <p>How can I achieve this within the <code>ApiRequest</code> class?</p>