1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 15:13:29 +01:00
invoiceninja/app/Http/Controllers/Contact/InvoiceController.php

51 lines
1.1 KiB
PHP
Raw Normal View History

2019-07-10 03:42:34 +02:00
<?php
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2019. Invoice Ninja LLC (https://invoiceninja.com)
*
* @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);
}
}