1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Adminetic\Website\Http\Controllers\Admin; |
4
|
|
|
|
5
|
|
|
use Adminetic\Website\Contracts\SoftwareRepositoryInterface; |
6
|
|
|
use Adminetic\Website\Http\Requests\SoftwareRequest; |
7
|
|
|
use Adminetic\Website\Models\Admin\Software; |
8
|
|
|
use App\Http\Controllers\Controller; |
|
|
|
|
9
|
|
|
|
10
|
|
|
class SoftwareController extends Controller |
11
|
|
|
{ |
12
|
|
|
protected $softwareRepositoryInterface; |
13
|
|
|
|
14
|
|
|
public function __construct(SoftwareRepositoryInterface $softwareRepositoryInterface) |
15
|
|
|
{ |
16
|
|
|
$this->softwareRepositoryInterface = $softwareRepositoryInterface; |
17
|
|
|
$this->authorizeResource(Software::class, 'software'); |
18
|
|
|
} |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* Display a listing of the resource. |
22
|
|
|
* |
23
|
|
|
* @return \Illuminate\Http\Response |
24
|
|
|
*/ |
25
|
|
|
public function index() |
26
|
|
|
{ |
27
|
|
|
return view('website::admin.software.index', $this->softwareRepositoryInterface->indexSoftware()); |
|
|
|
|
28
|
|
|
} |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* Show the form for creating a new resource. |
32
|
|
|
* |
33
|
|
|
* @return \Illuminate\Http\Response |
34
|
|
|
*/ |
35
|
|
|
public function create() |
36
|
|
|
{ |
37
|
|
|
return view('website::admin.software.create'); |
|
|
|
|
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* Store a newly created resource in storage. |
42
|
|
|
* |
43
|
|
|
* @param \Adminetic\Website\Http\Requests\SoftwareRequest $request |
44
|
|
|
* @return \Illuminate\Http\Response |
45
|
|
|
*/ |
46
|
|
|
public function store(SoftwareRequest $request) |
47
|
|
|
{ |
48
|
|
|
$this->softwareRepositoryInterface->storeSoftware($request); |
49
|
|
|
|
50
|
|
|
return redirect(adminRedirectRoute('software'))->withSuccess('Software Created Successfully.'); |
|
|
|
|
51
|
|
|
} |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* Display the specified resource. |
55
|
|
|
* |
56
|
|
|
* @param \Adminetic\Website\Models\Admin\Software $software |
57
|
|
|
* @return \Illuminate\Http\Response |
58
|
|
|
*/ |
59
|
|
|
public function show(Software $software) |
60
|
|
|
{ |
61
|
|
|
return view('website::admin.software.show', $this->softwareRepositoryInterface->showSoftware($software)); |
|
|
|
|
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* Show the form for editing the specified resource. |
66
|
|
|
* |
67
|
|
|
* @param \Adminetic\Website\Models\Admin\Software $software |
68
|
|
|
* @return \Illuminate\Http\Response |
69
|
|
|
*/ |
70
|
|
|
public function edit(Software $software) |
71
|
|
|
{ |
72
|
|
|
return view('website::admin.software.edit', $this->softwareRepositoryInterface->editSoftware($software)); |
|
|
|
|
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* Update the specified resource in storage. |
77
|
|
|
* |
78
|
|
|
* @param \Adminetic\Website\Http\Requests\SoftwareRequest $request |
79
|
|
|
* @param \Adminetic\Website\Models\Admin\Software $software |
80
|
|
|
* @return \Illuminate\Http\Response |
81
|
|
|
*/ |
82
|
|
|
public function update(SoftwareRequest $request, Software $software) |
83
|
|
|
{ |
84
|
|
|
$this->softwareRepositoryInterface->updateSoftware($request, $software); |
85
|
|
|
|
86
|
|
|
return redirect(adminRedirectRoute('software'))->withInfo('Software Updated Successfully.'); |
|
|
|
|
87
|
|
|
} |
88
|
|
|
|
89
|
|
|
/** |
90
|
|
|
* Remove the specified resource from storage. |
91
|
|
|
* |
92
|
|
|
* @param \Adminetic\Website\Models\Admin\Software $software |
93
|
|
|
* @return \Illuminate\Http\Response |
94
|
|
|
*/ |
95
|
|
|
public function destroy(Software $software) |
96
|
|
|
{ |
97
|
|
|
$this->softwareRepositoryInterface->destroySoftware($software); |
98
|
|
|
|
99
|
|
|
return redirect(adminRedirectRoute('software'))->withFail('Software Deleted Successfully.'); |
|
|
|
|
100
|
|
|
} |
101
|
|
|
} |
102
|
|
|
|
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