mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Reduce object sizes in Livewire
This commit is contained in:
parent
28cbe52d9c
commit
3e4926d88e
@ -52,7 +52,7 @@ class InvoiceController extends Controller
|
|||||||
*
|
*
|
||||||
* @return Factory|View
|
* @return Factory|View
|
||||||
*/
|
*/
|
||||||
public function show(ShowInvoiceRequest $request, Invoice $invoice, ?string $hash)
|
public function show(ShowInvoiceRequest $request, Invoice $invoice, ?string $hash = null)
|
||||||
{
|
{
|
||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
|
|
||||||
|
@ -174,6 +174,8 @@ class BillingPortalPurchase extends Component
|
|||||||
*/
|
*/
|
||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
|
public $db;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Campaign reference.
|
* Campaign reference.
|
||||||
*
|
*
|
||||||
@ -183,7 +185,10 @@ class BillingPortalPurchase extends Component
|
|||||||
|
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
MultiDB::setDb($this->company->db);
|
MultiDB::setDb($this->db);
|
||||||
|
|
||||||
|
$this->subscription = Subscription::with('company')->find($this->subscription);
|
||||||
|
$this->company = $this->subscription->company;
|
||||||
|
|
||||||
$this->quantity = 1;
|
$this->quantity = 1;
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
@section('meta_title', ctrans('texts.purchase'))
|
@section('meta_title', ctrans('texts.purchase'))
|
||||||
|
|
||||||
@section('body')
|
@section('body')
|
||||||
@livewire('billing-portal-purchase', ['subscription' => $subscription, 'company' => $subscription->company, 'contact' => auth()->guard('contact')->user(), 'hash' => $hash, 'request_data' => $request_data, 'campaign' => request()->query('campaign') ?? null])
|
@livewire('billing-portal-purchase', ['subscription' => $subscription->id, 'db' => $subscription->company->db, 'contact' => auth()->guard('contact')->user(), 'hash' => $hash, 'request_data' => $request_data, 'campaign' => request()->query('campaign') ?? null])
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@push('footer')
|
@push('footer')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user