1 | <?php |
||
2 | |||
3 | namespace Pratiksh\Adminetic\Http\Controllers; |
||
4 | |||
5 | use Exception; |
||
6 | use Illuminate\Routing\Controller; |
||
7 | |||
8 | class HomeController extends Controller |
||
9 | { |
||
10 | /** |
||
11 | * Create a new controller instance. |
||
12 | * |
||
13 | * @return void |
||
14 | */ |
||
15 | public function __construct() |
||
16 | { |
||
17 | $this->middleware('auth'); |
||
18 | } |
||
19 | |||
20 | /** |
||
21 | * Show the application dashboard. |
||
22 | * |
||
23 | * @return \Illuminate\Contracts\Support\Renderable |
||
24 | */ |
||
25 | public function index() |
||
26 | { |
||
27 | $view = null; |
||
28 | $dashboard = \App\Services\MyDashboard::class; |
||
0 ignored issues
–
show
|
|||
29 | if (class_exists($dashboard)) { |
||
30 | if (method_exists($dashboard, 'view')) { |
||
31 | $my_dashboard = new $dashboard; |
||
32 | $view = $my_dashboard->view(); |
||
33 | } else { |
||
34 | throw new Exception('view method is not found', 1); |
||
35 | } |
||
36 | } |
||
37 | |||
38 | return $view ?? view('adminetic::admin.dashboard.index'); |
||
39 | } |
||
40 | } |
||
41 |
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