add shipping rules
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace App\Datatables\Shop;
|
||||
|
||||
use Yajra\DataTables\Html\Column;
|
||||
use App\Datatables\ParentDataTable as DataTable;
|
||||
use App\Models\Shop\Delivery;
|
||||
use Yajra\DataTables\Html\Column;
|
||||
|
||||
class DeliveriesDataTable extends DataTable
|
||||
{
|
||||
@@ -13,6 +13,7 @@ class DeliveriesDataTable extends DataTable
|
||||
public function query(Delivery $model)
|
||||
{
|
||||
$model = $model->with('sale_channel');
|
||||
|
||||
return $this->buildQuery($model);
|
||||
}
|
||||
|
||||
@@ -20,18 +21,19 @@ class DeliveriesDataTable extends DataTable
|
||||
{
|
||||
$datatables
|
||||
->editColumn('active', function (Delivery $delivery) {
|
||||
return view("components.form.toggle", [
|
||||
return view('components.form.toggle', [
|
||||
'value' => $delivery->active,
|
||||
'on' => __('active'),
|
||||
'off' => __('inactive'),
|
||||
'meta' => 'data-id=' . $delivery->id,
|
||||
'meta' => 'data-id='.$delivery->id,
|
||||
'size' => 'sm',
|
||||
]);
|
||||
})
|
||||
->editColumn('address', function (Delivery $delivery) {
|
||||
return $delivery->address . ' ' . $delivery->zipcode . ' ' . $delivery->city;
|
||||
return $delivery->address.' '.$delivery->zipcode.' '.$delivery->city;
|
||||
})
|
||||
->rawColumns(['active', 'address', 'action']);
|
||||
->rawColumns(['active', 'address', 'action']);
|
||||
|
||||
return parent::modifier($datatables);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user