public function getLimitstok(Request $req) { if ($req->ajax()) { $total = data_item_gudang::habis()->count(); $res = $total > 10 ? '10+' : $total; return json_encode(['total' => $res]); } }