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