add admin gate
This commit is contained in:
@@ -28,11 +28,13 @@ class OwnerTransactionController extends Controller
|
||||
|
||||
public function edit(OwnerTransaction $owner)
|
||||
{
|
||||
$this->authorize('admin-only');
|
||||
return view('owners.edit', ['owner' => $owner]);
|
||||
}
|
||||
|
||||
public function update(OwnerTransaction $owner, Request $request)
|
||||
{
|
||||
$this->authorize('admin-only');
|
||||
$formFields = $request->validate([
|
||||
'rz_username' => 'required',
|
||||
'timestamp_owner_since' => 'required'
|
||||
@@ -45,6 +47,7 @@ class OwnerTransactionController extends Controller
|
||||
|
||||
public function destroy(OwnerTransaction $owner)
|
||||
{
|
||||
$this->authorize('admin-only');
|
||||
$owner->delete();
|
||||
return back();
|
||||
}
|
||||
|
Reference in New Issue
Block a user