1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-23 09:51:35 +02:00
invoiceninja/app/Livewire/BillingPortal/RFF.php

46 lines
1.2 KiB
PHP
Raw Normal View History

2024-02-13 18:57:05 +01:00
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Livewire\BillingPortal;
2024-02-22 14:07:57 +01:00
use App\Models\CompanyGateway;
use Illuminate\Support\Facades\Cache;
use Livewire\Attributes\On;
2024-02-13 18:57:05 +01:00
use Livewire\Component;
class RFF extends Component
{
public array $context;
2024-02-22 14:07:57 +01:00
#[On('passed-required-fields-check')]
public function continue(): void
2024-02-13 18:57:05 +01:00
{
$this->dispatch('purchase.context', property: 'contact', value: auth()->guard('contact')->user());
2024-02-13 18:57:05 +01:00
$this->dispatch('purchase.next');
}
2024-02-13 18:57:05 +01:00
public function render()
{
2024-03-05 01:26:34 +01:00
2024-02-22 14:07:57 +01:00
$gateway = CompanyGateway::findOrFail($this->context['form']['company_gateway_id']);
$countries = Cache::get('countries');
return view('billing-portal.v3.rff', [
'gateway' => $gateway->driver(
auth()->guard('contact')->user()->client
),
'countries' => $countries,
'company' => $gateway->company,
]);
2024-02-13 18:57:05 +01:00
}
}