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

48 lines
1.1 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) 2020. 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;
use Illuminate\Http\Request;
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
*
* @param \App\Filters\InvoiceFilters $filters The filters
2019-07-10 03:42:34 +02:00
*
* @return \Illuminate\Http\Response
*/
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);
}
}