mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-05 18:52:44 +01:00
39 lines
799 B
PHP
39 lines
799 B
PHP
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Livewire;
|
|
|
|
use App\Models\ClientGatewayToken;
|
|
use App\Utils\Traits\WithSorting;
|
|
use Livewire\Component;
|
|
use Livewire\WithPagination;
|
|
|
|
class PaymentMethodsTable extends Component
|
|
{
|
|
use WithPagination;
|
|
use WithSorting;
|
|
|
|
public $per_page = 10;
|
|
public $client;
|
|
|
|
public function mount($client)
|
|
{
|
|
$this->client = $client;
|
|
}
|
|
|
|
public function render()
|
|
{
|
|
$query = ClientGatewayToken::query()
|
|
->with('gateway_type')
|
|
->where('client_id', $this->client->id)
|
|
->orderBy($this->sort_field, $this->sort_asc ? 'asc' : 'desc')
|
|
->paginate($this->per_page);
|
|
|
|
return render('components.livewire.payment-methods-table', [
|
|
'payment_methods' => $query,
|
|
]);
|
|
}
|
|
}
|