|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Adminetic\Website\Http\Controllers\Admin; |
|
4
|
|
|
|
|
5
|
|
|
use Adminetic\Website\Contracts\PopupRepositoryInterface; |
|
6
|
|
|
use Adminetic\Website\Http\Requests\PopupRequest; |
|
7
|
|
|
use Adminetic\Website\Models\Admin\Popup; |
|
8
|
|
|
use App\Http\Controllers\Controller; |
|
|
|
|
|
|
9
|
|
|
|
|
10
|
|
|
class PopupController extends Controller |
|
11
|
|
|
{ |
|
12
|
|
|
protected $popupRepositoryInterface; |
|
13
|
|
|
|
|
14
|
|
|
public function __construct(PopupRepositoryInterface $popupRepositoryInterface) |
|
15
|
|
|
{ |
|
16
|
|
|
$this->popupRepositoryInterface = $popupRepositoryInterface; |
|
17
|
|
|
$this->authorizeResource(Popup::class, 'popup'); |
|
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.popup.index', $this->popupRepositoryInterface->indexPopup()); |
|
|
|
|
|
|
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.popup.create'); |
|
|
|
|
|
|
38
|
|
|
} |
|
39
|
|
|
|
|
40
|
|
|
/** |
|
41
|
|
|
* Store a newly created resource in storage. |
|
42
|
|
|
* |
|
43
|
|
|
* @param \Adminetic\Website\Http\Requests\PopupRequest $request |
|
44
|
|
|
* @return \Illuminate\Http\Response |
|
45
|
|
|
*/ |
|
46
|
|
|
public function store(PopupRequest $request) |
|
47
|
|
|
{ |
|
48
|
|
|
$this->popupRepositoryInterface->storePopup($request); |
|
49
|
|
|
|
|
50
|
|
|
return redirect(adminRedirectRoute('popup'))->withSuccess('Popup Created Successfully.'); |
|
|
|
|
|
|
51
|
|
|
} |
|
52
|
|
|
|
|
53
|
|
|
/** |
|
54
|
|
|
* Display the specified resource. |
|
55
|
|
|
* |
|
56
|
|
|
* @param \Adminetic\Website\Models\Admin\Popup $popup |
|
57
|
|
|
* @return \Illuminate\Http\Response |
|
58
|
|
|
*/ |
|
59
|
|
|
public function show(Popup $popup) |
|
60
|
|
|
{ |
|
61
|
|
|
return view('website::admin.popup.show', $this->popupRepositoryInterface->showPopup($popup)); |
|
|
|
|
|
|
62
|
|
|
} |
|
63
|
|
|
|
|
64
|
|
|
/** |
|
65
|
|
|
* Show the form for editing the specified resource. |
|
66
|
|
|
* |
|
67
|
|
|
* @param \Adminetic\Website\Models\Admin\Popup $popup |
|
68
|
|
|
* @return \Illuminate\Http\Response |
|
69
|
|
|
*/ |
|
70
|
|
|
public function edit(Popup $popup) |
|
71
|
|
|
{ |
|
72
|
|
|
return view('website::admin.popup.edit', $this->popupRepositoryInterface->editPopup($popup)); |
|
|
|
|
|
|
73
|
|
|
} |
|
74
|
|
|
|
|
75
|
|
|
/** |
|
76
|
|
|
* Update the specified resource in storage. |
|
77
|
|
|
* |
|
78
|
|
|
* @param \Adminetic\Website\Http\Requests\PopupRequest $request |
|
79
|
|
|
* @param \Adminetic\Website\Models\Admin\Popup $popup |
|
80
|
|
|
* @return \Illuminate\Http\Response |
|
81
|
|
|
*/ |
|
82
|
|
|
public function update(PopupRequest $request, Popup $popup) |
|
83
|
|
|
{ |
|
84
|
|
|
$this->popupRepositoryInterface->updatePopup($request, $popup); |
|
85
|
|
|
|
|
86
|
|
|
return redirect(adminRedirectRoute('popup'))->withInfo('Popup Updated Successfully.'); |
|
|
|
|
|
|
87
|
|
|
} |
|
88
|
|
|
|
|
89
|
|
|
/** |
|
90
|
|
|
* Remove the specified resource from storage. |
|
91
|
|
|
* |
|
92
|
|
|
* @param \Adminetic\Website\Models\Admin\Popup $popup |
|
93
|
|
|
* @return \Illuminate\Http\Response |
|
94
|
|
|
*/ |
|
95
|
|
|
public function destroy(Popup $popup) |
|
96
|
|
|
{ |
|
97
|
|
|
$this->popupRepositoryInterface->destroyPopup($popup); |
|
98
|
|
|
|
|
99
|
|
|
return redirect(adminRedirectRoute('popup'))->withFail('Popup 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