company_key); return true; } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ // ]; } public function getCompany(): ?Company { return Company::where('company_key', $this->company_key)->first(); } public function getCompanyGateway(): ?CompanyGateway { return CompanyGateway::find($this->decodePrimaryKey($this->company_gateway_id)); } public function getPaymentHash(): ?PaymentHash { return PaymentHash::where('hash', $this->hash)->firstOrFail(); } public function getClient(): ?Client { return Client::find($this->getPaymentHash()->data->client_id); } }