1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-05 18:52:44 +01:00
invoiceninja/app/Http/Controllers/Contact/InvoiceController.php

48 lines
1.0 KiB
PHP
Raw Normal View History

2019-07-10 03:42:34 +02:00
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
2019-07-10 03:42:34 +02:00
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
2019-07-10 03:42:34 +02:00
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\Http\Controllers\Contact;
use App\Filters\InvoiceFilters;
2019-07-10 03:42:34 +02:00
use App\Http\Controllers\BaseController;
use App\Models\Invoice;
use App\Transformers\Contact\InvoiceTransformer;
use App\Utils\Traits\MakesHash;
2020-10-28 11:10:49 +01:00
use Illuminate\Http\Response;
2019-07-10 03:42:34 +02:00
class InvoiceController extends BaseController
{
use MakesHash;
protected $entity_type = Invoice::class;
protected $entity_transformer = InvoiceTransformer::class;
public function __construct()
{
parent::__construct();
}
/**
* List Invoices.
2019-07-10 03:42:34 +02:00
*
2020-10-28 11:10:49 +01:00
* @param InvoiceFilters $filters The filters
2019-07-10 03:42:34 +02:00
*
2020-10-28 11:10:49 +01:00
* @return Response
2019-07-10 03:42:34 +02:00
*/
public function index(InvoiceFilters $filters)
2019-07-10 03:42:34 +02:00
{
$invoices = Invoice::filter($filters);
2019-07-10 03:42:34 +02:00
return $this->listResponse($invoices);
}
}