Passed
Push — master ( 6ac985...96b623 )
by Bruno
09:22 queued 14s
created

DummyNameController::getPermissions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
c 0
b 0
f 0
dl 0
loc 8
rs 10
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * This file was automatically generated by Modelarium.
4
 */
5
6
namespace App\Http\Controllers;
7
8
use Illuminate\Database\Eloquent\Model;
9
use Illuminate\Http\Request;
10
use Illuminate\Support\Facades\Gate;
11
12
class DummyNameController extends Controller
13
{
14
    use FormulariumControllerAPI, FormulariumControllerRoutes, FormulariumControllerDebug;
15
16
    public function getPermissions()
17
    {
18
        $name = $this->getClassName();
19
        $can = [
20
            'store' => Gate::allows('store', $name),
21
            'index' => Gate::allows('index', $name)
22
        ];
23
        return $can;
24
    }
25
26
    protected function getStoreRules(Model $model): array
27
    {
28
        return [];
29
    }
30
31
    protected function getShowVisibleAttributes(): array
32
    {
33
        return []; // this is everything
34
    }
35
36
    protected function getAppendAttributes(): array
37
    {
38
        return [];
39
    }
40
}
41