App\Http\Requests\CreateOnlinePaymentRequest::sanitize PHP Method

sanitize() public method

public sanitize ( )
    public function sanitize()
    {
        $input = $this->all();
        $invitation = Invitation::with('invoice.invoice_items', 'invoice.client.currency', 'invoice.client.account.currency', 'invoice.client.account.account_gateways.gateway')->where('invitation_key', '=', $this->invitation_key)->firstOrFail();
        $input['invitation'] = $invitation;
        $input['gateway_type'] = session($invitation->id . 'gateway_type');
        $this->replace($input);
        return $this->all();
    }
CreateOnlinePaymentRequest