PaymentTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 18
c 1
b 0
f 0
dl 0
loc 26
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A columns() 0 17 1
A configure() 0 3 1
1
<?php
2
3
namespace Adminetic\Website\Http\Livewire\Admin\Payment;
4
5
use Adminetic\Website\Models\Admin\Payment;
6
use Rappasoft\LaravelLivewireTables\DataTableComponent;
7
use Rappasoft\LaravelLivewireTables\Views\Column;
8
9
class PaymentTable extends DataTableComponent
10
{
11
    protected $model = Payment::class;
12
13
    public function configure(): void
14
    {
15
        $this->setPrimaryKey('id');
16
    }
17
18
    public function columns(): array
19
    {
20
        return [
21
            Column::make('Id', 'id')
22
                ->sortable(),
23
            Column::make('Particular', 'particular')
24
                ->sortable(),
25
            Column::make('Amount', 'amount')
26
                ->sortable(),
27
            Column::make('Type', 'type')
28
                ->sortable(),
29
            Column::make('Paymentable type', 'paymentable_type')
30
                ->sortable(),
31
            Column::make('Created at', 'created_at')
32
                ->sortable(),
33
            Column::make('Updated at', 'updated_at')
34
                ->sortable(),
35
        ];
36
    }
37
}
38