update
This commit is contained in:
@@ -59,6 +59,23 @@ class ProductCategoryController extends Controller
|
||||
return redirect()->route('products.group.index')->with('success', 'Delete Group Success');
|
||||
}
|
||||
|
||||
public function trash()
|
||||
{
|
||||
return view('administrator.pages.product.categories.trash');
|
||||
}
|
||||
|
||||
public function restore(int $id)
|
||||
{
|
||||
$this->productCategoryService->restore($id);
|
||||
return redirect()->route('products.group.trash')->with('success', 'Restore Group Success');
|
||||
}
|
||||
|
||||
public function forceDelete(int $id)
|
||||
{
|
||||
$this->productCategoryService->forceDelete($id);
|
||||
return redirect()->route('products.group.trash')->with('success', 'Force Delete Group Success');
|
||||
}
|
||||
|
||||
public function datatable(Request $request)
|
||||
{
|
||||
$query = $this->productCategoryRepository->filter(
|
||||
@@ -72,7 +89,10 @@ class ProductCategoryController extends Controller
|
||||
return DataTables::eloquent($query)
|
||||
->addColumn(
|
||||
'action',
|
||||
function ($d) {
|
||||
function ($d) use ($request) {
|
||||
if ($request->has('trashed') && $request->trashed == 1) {
|
||||
return view('administrator.pages.product.categories.datatable.action_trash', ['row' => $d])->render();
|
||||
}
|
||||
return view('administrator.pages.product.categories.datatable.action', ['row' => $d])->render();
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user