29 lines
492 B
PHP
29 lines
492 B
PHP
<?php
|
|
|
|
namespace App\Datatables\Shop;
|
|
|
|
use Yajra\DataTables\Html\Column;
|
|
use App\Datatables\ParentDataTable as DataTable;
|
|
use App\Models\Shop\Invoice;
|
|
|
|
class InvoicesDataTable extends DataTable
|
|
{
|
|
public $model_name = 'Invoices';
|
|
|
|
public function query(Invoice $model)
|
|
{
|
|
return self::buildQuery($model);
|
|
}
|
|
|
|
protected function getColumns()
|
|
{
|
|
return [
|
|
Column::make('status.name'),
|
|
Column::make('customer.name'),
|
|
Column::make('total'),
|
|
self::makeColumnButtons(),
|
|
];
|
|
}
|
|
|
|
}
|