We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Total Complexity | 4 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
10 | class FakeUploaderCrudController extends CrudController |
||
11 | { |
||
12 | use \Backpack\CRUD\app\Http\Controllers\Operations\CreateOperation; |
||
|
|||
13 | use \Backpack\CRUD\app\Http\Controllers\Operations\UpdateOperation; |
||
14 | use \Backpack\CRUD\app\Http\Controllers\Operations\DeleteOperation; |
||
15 | |||
16 | public function setup() |
||
21 | } |
||
22 | |||
23 | protected function setupCreateOperation() |
||
24 | { |
||
25 | CRUD::field('upload') |
||
26 | ->type('upload') |
||
27 | ->fake(true) |
||
28 | ->withFiles(['disk' => 'uploaders', 'fileNamer' => fn ($value) => $value->getClientOriginalName()]); |
||
29 | CRUD::field('upload_multiple') |
||
30 | ->type('upload_multiple') |
||
31 | ->fake(true) |
||
32 | ->withFiles(['disk' => 'uploaders', 'fileNamer' => fn ($value) => $value->getClientOriginalName()]); |
||
33 | } |
||
34 | |||
35 | protected function setupUpdateOperation() |
||
36 | { |
||
37 | $this->setupCreateOperation(); |
||
38 | } |
||
39 | |||
40 | public function setupDeleteOperation() |
||
43 | } |
||
44 | } |
||
45 |