1 | <?php |
||
2 | |||
3 | namespace App\Http\Controllers; |
||
4 | |||
5 | use App\Association; |
||
6 | use App\User; |
||
7 | use Bouncer; |
||
0 ignored issues
–
show
|
|||
8 | use Illuminate\Http\Request; |
||
9 | |||
10 | class AdminController extends Controller |
||
11 | { |
||
12 | |||
13 | public function admin() { |
||
14 | if (Bouncer::can('view-admin-pages')) { |
||
15 | return view('admin'); |
||
16 | } |
||
17 | else { |
||
18 | return view('denied'); |
||
19 | } |
||
20 | } |
||
21 | |||
22 | public function users() { |
||
23 | if (Bouncer::can('administer-users')) { |
||
24 | return view('admin.users', [ |
||
25 | 'users' => User::all(), |
||
26 | ]); |
||
27 | } |
||
28 | else { |
||
29 | return view('denied'); |
||
30 | } |
||
31 | } |
||
32 | |||
33 | public function associationsDeleted() { |
||
34 | if (Bouncer::can('administer-associations')) { |
||
35 | $associations = Association::onlyTrashed()->get(); |
||
36 | |||
37 | return view('admin.associations.trashed', ['associations' => $associations]); |
||
38 | } |
||
39 | else { |
||
40 | return view('denied'); |
||
41 | } |
||
42 | } |
||
43 | |||
44 | } |
||
45 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths