|
|
@ -172,10 +172,12 @@ class ProductController extends Controller
|
|
|
|
if ($request->filter == 'TRASH'){
|
|
|
|
if ($request->filter == 'TRASH'){
|
|
|
|
$n = $n->onlyTrashed();
|
|
|
|
$n = $n->onlyTrashed();
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
|
|
$n = $n->where('stock_status', $request->filter);
|
|
|
|
$n = $n->where('stock_status', $request->filter);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($request->has('q')){
|
|
|
|
|
|
|
|
$n->where('name','LIKE','%'.$request->input('q').'%');
|
|
|
|
|
|
|
|
}
|
|
|
|
$products = $n->paginate(20);
|
|
|
|
$products = $n->paginate(20);
|
|
|
|
return view('admin.product.productIndex', compact('products'));
|
|
|
|
return view('admin.product.productIndex', compact('products'));
|
|
|
|
}
|
|
|
|
}
|
|
|
|