1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Pratiksh\Adminetic\Http\Controllers\Admin; |
4
|
|
|
|
5
|
|
|
use App\Http\Controllers\Controller; |
|
|
|
|
6
|
|
|
use Illuminate\Http\Request; |
7
|
|
|
use Pratiksh\Adminetic\Contracts\SettingRepositoryInterface; |
8
|
|
|
use Pratiksh\Adminetic\Http\Requests\SettingRequest; |
9
|
|
|
use Pratiksh\Adminetic\Models\Admin\Setting; |
10
|
|
|
|
11
|
|
|
class SettingController extends Controller |
12
|
|
|
{ |
13
|
|
|
protected $settingRepositoryInterface; |
14
|
|
|
|
15
|
|
|
public function __construct(SettingRepositoryInterface $settingRepositoryInterface) |
16
|
|
|
{ |
17
|
|
|
$this->settingRepositoryInterface = $settingRepositoryInterface; |
18
|
|
|
$this->authorizeResource(Setting::class, 'setting'); |
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('adminetic::admin.setting.index', $this->settingRepositoryInterface->indexSetting()); |
|
|
|
|
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('adminetic::admin.setting.create', $this->settingRepositoryInterface->createSetting()); |
|
|
|
|
39
|
|
|
} |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* Store a newly created resource in storage. |
43
|
|
|
* |
44
|
|
|
* @param \Pratiksh\Adminetic\Http\Requests\SettingRequest $request |
45
|
|
|
* @return \Illuminate\Http\Response |
46
|
|
|
*/ |
47
|
|
|
public function store(SettingRequest $request) |
48
|
|
|
{ |
49
|
|
|
$this->settingRepositoryInterface->storeSetting($request); |
50
|
|
|
|
51
|
|
|
return redirect(adminRedirectRoute('setting'))->withSuccess('Setting Created Successfully.'); |
|
|
|
|
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* Display the specified resource. |
56
|
|
|
* |
57
|
|
|
* @param \Pratiksh\Adminetic\Models\Admin\Setting $setting |
58
|
|
|
* @return \Illuminate\Http\Response |
59
|
|
|
*/ |
60
|
|
|
public function show(Setting $setting) |
61
|
|
|
{ |
62
|
|
|
return view('adminetic::admin.setting.show', $this->settingRepositoryInterface->showSetting($setting)); |
|
|
|
|
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* Show the form for editing the specified resource. |
67
|
|
|
* |
68
|
|
|
* @param \Pratiksh\Adminetic\Models\Admin\Setting $setting |
69
|
|
|
* @return \Illuminate\Http\Response |
70
|
|
|
*/ |
71
|
|
|
public function edit(Setting $setting) |
72
|
|
|
{ |
73
|
|
|
return view('adminetic::admin.setting.edit', $this->settingRepositoryInterface->editSetting($setting)); |
|
|
|
|
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* Update the specified resource in storage. |
78
|
|
|
* |
79
|
|
|
* @param \Pratiksh\Adminetic\Http\Requests\SettingRequest $request |
80
|
|
|
* @param \Pratiksh\Adminetic\Models\Admin\Setting $setting |
81
|
|
|
* @return \Illuminate\Http\Response |
82
|
|
|
*/ |
83
|
|
|
public function update(SettingRequest $request, Setting $setting) |
84
|
|
|
{ |
85
|
|
|
$this->settingRepositoryInterface->updateSetting($request, $setting); |
86
|
|
|
|
87
|
|
|
return redirect(adminRedirectRoute('setting'))->withInfo('Setting Updated Successfully.'); |
|
|
|
|
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* Remove the specified resource from storage. |
92
|
|
|
* |
93
|
|
|
* @param \Pratiksh\Adminetic\Models\Admin\Setting $setting |
94
|
|
|
* @return \Illuminate\Http\Response |
95
|
|
|
*/ |
96
|
|
|
public function destroy(Setting $setting) |
97
|
|
|
{ |
98
|
|
|
$this->settingRepositoryInterface->destroySetting($setting); |
99
|
|
|
|
100
|
|
|
return redirect(adminRedirectRoute('setting'))->withFail('Setting Deleted Successfully.'); |
|
|
|
|
101
|
|
|
} |
102
|
|
|
|
103
|
|
|
/** |
104
|
|
|
* Setting Store. |
105
|
|
|
*/ |
106
|
|
|
public function setting_store(Request $request) |
107
|
|
|
{ |
108
|
|
|
$this->settingRepositoryInterface->setting_store($request); |
109
|
|
|
|
110
|
|
|
return redirect(adminRedirectRoute('setting'))->withInfo('Settings Saved !.'); |
111
|
|
|
} |
112
|
|
|
} |
113
|
|
|
|
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