improve filters

This commit is contained in:
denisdulici
2017-09-27 21:40:25 +03:00
parent e4267c7f4a
commit 47f7b5b20e
26 changed files with 62 additions and 29 deletions

View File

@ -40,10 +40,13 @@ class Invoices extends Controller
{
$invoices = Invoice::with('status')->collect();
$status = collect(InvoiceStatus::all()->pluck('name', 'code'))
->prepend(trans('general.all_statuses'), '');
$customers = collect(Customer::enabled()->pluck('name', 'id'))
->prepend(trans('general.all_type', ['type' => trans_choice('general.customers', 2)]), '');
return view('incomes.invoices.index', compact('invoices', 'status'));
$status = collect(InvoiceStatus::all()->pluck('name', 'code'))
->prepend(trans('general.all_type', ['type' => trans_choice('general.statuses', 2)]), '');
return view('incomes.invoices.index', compact('invoices', 'customers', 'status'));
}
/**