Passed
Push — master ( afb865...5313f5 )
by Reza
03:19
created

Lists::render()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 7
rs 10
1
<?php
2
3
namespace EasyPanel\Http\Livewire\CRUD;
4
5
use EasyPanel\Models\Todo;
6
use Livewire\Component;
7
use Livewire\WithPagination;
8
use EasyPanel\Models\CRUD;
9
10
class Lists extends Component
11
{
12
    use WithPagination;
13
14
    protected $paginationTheme = 'bootstrap';
15
16
    protected $listeners = ['crudUpdated'];
17
18
    public function crudUpdated()
19
    {
20
        // There is nothing to do, just update It.
21
    }
22
23
    public function render()
24
    {
25
        $cruds = CRUD::query()
26
            ->paginate(20);
27
28
        return view('admin::livewire.crud.lists', compact('cruds'))
29
            ->layout('admin::layouts.app');
30
    }
31
}
32