Add key management page

This commit is contained in:
2021-03-30 18:16:01 +01:00
parent 99779c9053
commit 2bc07d8ca0
4 changed files with 123 additions and 0 deletions

View File

@@ -21,6 +21,21 @@ class ApiKeyController extends Controller
->with('keys', Auth::user()->keys);
}
public function adminKeys()
{
if (Auth::user()->hasRole('admin'))
{
return view('dashboard.administration.keys')
->with('keys', ApiKey::all());
}
else
{
return redirect()
->back()
->with('error', 'You do not have permission to access this page.');
}
}
/**
* Store a newly created resource in storage.
*