Total Complexity | 3 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class File extends Generic |
||
9 | { |
||
10 | protected $visibility = [ |
||
11 | Scaffolding::PAGE_INDEX => true, |
||
12 | Scaffolding::PAGE_EDIT => true, |
||
13 | Scaffolding::PAGE_VIEW => true, |
||
14 | ]; |
||
15 | |||
16 | /** |
||
17 | * @return null|mixed|string |
||
18 | */ |
||
19 | protected function onIndex() |
||
20 | { |
||
21 | return [ |
||
22 | 'attachment' => $this->model->{$this->id}, |
||
23 | ]; |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * @return \Illuminate\Contracts\View\View |
||
28 | */ |
||
29 | public function onEdit() |
||
30 | { |
||
31 | return $this->onIndex(); |
||
|
|||
32 | } |
||
33 | |||
34 | /** |
||
35 | * @return \Illuminate\Contracts\View\View |
||
36 | */ |
||
37 | public function onView() |
||
40 | } |
||
41 | } |
||
42 |