'required', 'payment_hash' => 'required', ]; } public function getPaymentHash() { $input = $this->all(); return PaymentHash::whereRaw('BINARY `hash`= ?', [$input['payment_hash']])->first(); } public function prepareForValidation() { $store_card = false; if ($this->has('store_card') && ($this->store_card === "true" || $this->store_card === true)) { $store_card = true; } $this->merge([ 'store_card' => $store_card, ]); } }