add shipping rules
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
|
||||
namespace App\Datatables\Shop;
|
||||
|
||||
use Yajra\DataTables\Html\Column;
|
||||
use App\Datatables\ParentDataTable as DataTable;
|
||||
use App\Models\Shop\Invoice;
|
||||
use App\Repositories\Shop\Invoices;
|
||||
use Yajra\DataTables\Html\Column;
|
||||
|
||||
class InvoicesDataTable extends DataTable
|
||||
{
|
||||
@@ -14,6 +14,7 @@ class InvoicesDataTable extends DataTable
|
||||
public function query(Invoice $model)
|
||||
{
|
||||
$model = $model->with('customer');
|
||||
|
||||
return $this->buildQuery($model);
|
||||
}
|
||||
|
||||
@@ -27,9 +28,10 @@ class InvoicesDataTable extends DataTable
|
||||
return $invoice->created_at->toDateTimeString();
|
||||
})
|
||||
->editColumn('customer.last_name', function (Invoice $invoice) {
|
||||
return ($invoice->customer ?? false) ? $invoice->customer->last_name . ' ' . $invoice->customer->first_name : '';
|
||||
return ($invoice->customer ?? false) ? $invoice->customer->last_name.' '.$invoice->customer->first_name : '';
|
||||
})
|
||||
->rawColumns(['action']);
|
||||
|
||||
return parent::modifier($datatables);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user