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