title: How to show validation errors in laravel api while having a form request file separate from controller
body: <p>I have a form request file handling my validations separate from my controller. How do i return validation errors after an api call within the controller?</p>
  
  <p>//my controller</p>
  
  <pre><code>/**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
  public function orders(GetOrdersRequest $request, OrderRepository $orderRepository)
  {
  
      $order = $orderRepository-&gt;allOrders($request-&gt;paginate);
  
      return $this-&gt;sendSuccess('Orders retrieved successfully', $order);
  }
  </code></pre>