add initial api management page
This commit is contained in:
parent
09d9f2a064
commit
a6bc36a710
7 changed files with 169 additions and 1 deletions
32
app/Http/Controllers/Admin/APIController.php
Normal file
32
app/Http/Controllers/Admin/APIController.php
Normal file
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
namespace Pterodactyl\Http\Controllers\Admin;
|
||||
|
||||
use Alert;
|
||||
use Log;
|
||||
use Pterodactyl\Models;
|
||||
|
||||
use Pterodactyl\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class APIController extends Controller
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
public function getIndex(Request $request)
|
||||
{
|
||||
$keys = Models\APIKey::all();
|
||||
foreach($keys as &$key) {
|
||||
$key->permissions = Models\APIPermission::where('key_id', $key->id)->get();
|
||||
}
|
||||
|
||||
return view('admin.api.index', [
|
||||
'keys' => $keys
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue