Skip to content

Commit cb62713

Browse files
committed
Merge branch 'devel'
2 parents 76cd581 + a96bdd9 commit cb62713

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

app/Http/Controllers/ResourceController.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ public function index($table, Request $request)
5252
public function create($table, Request $request)
5353
{
5454
$role = Role::where('name', '=', 'guest')->first();
55-
if(!$role->hasPermissionTo('create bread ' . $table)){
55+
if(!$role->hasPermissionTo('add bread ' . $table)){
5656
if(empty(Auth::user())){
5757
abort('401');
5858
}else{
59-
if(!Auth::user()->can('create bread ' . $table)){
59+
if(!Auth::user()->can('add bread ' . $table)){
6060
abort('401');
6161
}
6262
}
@@ -88,11 +88,11 @@ public function create($table, Request $request)
8888
public function store($table, Request $request)
8989
{
9090
$role = Role::where('name', '=', 'guest')->first();
91-
if(!$role->hasPermissionTo('store bread ' . $table)){
91+
if(!$role->hasPermissionTo('add bread ' . $table)){
9292
if(empty(Auth::user())){
9393
abort('401');
9494
}else{
95-
if(!Auth::user()->can('store bread ' . $table)){
95+
if(!Auth::user()->can('add bread ' . $table)){
9696
abort('401');
9797
}
9898
}
@@ -191,11 +191,11 @@ public function edit($table, $id)
191191
public function update($table, $id, Request $request)
192192
{
193193
$role = Role::where('name', '=', 'guest')->first();
194-
if(!$role->hasPermissionTo('update bread ' . $table)){
194+
if(!$role->hasPermissionTo('edit bread ' . $table)){
195195
if(empty(Auth::user())){
196196
abort('401');
197197
}else{
198-
if(!Auth::user()->can('update bread ' . $table)){
198+
if(!Auth::user()->can('edit bread ' . $table)){
199199
abort('401');
200200
}
201201
}

0 commit comments

Comments
 (0)