pembiayaan = $pembiayaan; } /** * Determine if the validation rule passes. * * @param string $attribute * @param mixed $value * @return bool */ public function passes($attribute, $value) { $norujukanToPay = json_decode($value); $isNorujukanUjrah = fn ($x) => $x['tagbaru'] === 1 ? true : false; $norujukanUjrah = array_filter($this->pembiayaan, fn($x) => $isNorujukanUjrah($x)); return sizeof($norujukanUjrah) == 0; } /** * Get the validation error message. * * @return string */ public function message() { return 'Tidak dibenarkan pembayaran ujrah!'; } }