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