refactor: move product category sub-group datatable rendering from client-side JavaScript to a dedicated server-side Blade partial.
This commit is contained in:
@@ -123,7 +123,13 @@ class ProductCategoryController extends Controller
|
||||
return '<div class="form-check d-flex align-items-center justify-content-center"><input class="form-check-input dt-checkbox" type="checkbox" value="' . $d->id . '"></div>';
|
||||
}
|
||||
)
|
||||
->rawColumns(['details_control', 'action', 'is_active', 'checkbox'])
|
||||
->addColumn(
|
||||
'sub_group_html',
|
||||
function ($d) {
|
||||
return view('administrator.pages.product.categories.datatable.sub_group', ['children' => $d->children])->render();
|
||||
}
|
||||
)
|
||||
->rawColumns(['details_control', 'action', 'is_active', 'checkbox', 'sub_group_html'])
|
||||
->make(true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user