invoiceRepo = $invoiceRepo; } /** * @SWG\Get( * path="/quotes", * tags={"quote"}, * summary="List of quotes", * @SWG\Response( * response=200, * description="A list with quotes", * @SWG\Schema(type="array", @SWG\Items(ref="#/definitions/Invoice")) * ), * @SWG\Response( * response="default", * description="an ""unexpected"" error" * ) * ) */ public function index() { $invoices = Invoice::scope() ->withTrashed() ->where('is_quote', '=', '1') ->with('invoice_items', 'client') ->orderBy('created_at', 'desc'); return $this->listResponse($invoices); } }