Completed
Push — master ( 833504...ead8c1 )
by Reza
15s queued 11s
created

Lists   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A render() 0 7 1
A roleUpdated() 0 2 1
1
<?php
2
3
namespace EasyPanel\Http\Livewire\Role;
4
5
use Livewire\Component;
6
use Livewire\WithPagination;
7
use Iya30n\DynamicAcl\Models\Role;
8
9
class Lists extends Component
10
{
11
    use WithPagination;
12
13
    protected $paginationTheme = 'bootstrap';
14
15
    protected $listeners = ['roleUpdated'];
16
17
    public function roleUpdated()
18
    {
19
        // There is nothing to do, just update It.
20
    }
21
22
    public function render()
23
    {
24
        $roles = Role::query()
25
            ->paginate(20);
26
27
        return view('admin::livewire.role.lists', compact('roles'))
28
            ->layout('admin::layouts.app', ['title' => __('ListTitle', ['name' => __('Roles')])]);
29
    }
30
}
31