/** * Mengambil data limit Stok * @access Ajax */ public function getLimitstok(Request $req) { if ($req->ajax()) { $total = data_barang::stoklimit()->count(); return json_encode(['total' => $total]); } }