ctrlpanel/routes/api.php

28 lines
942 B
PHP
Raw Normal View History

2021-06-05 09:26:32 +00:00
<?php
2021-06-06 20:04:46 +00:00
use App\Http\Controllers\Api\ServerController;
use App\Http\Controllers\Api\UserController;
2021-06-05 09:26:32 +00:00
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
2021-06-06 20:21:26 +00:00
Route::middleware('api.token')->group(function () {
Route::resource('users', UserController::class)->except(['store', 'create']);
2021-06-06 20:04:46 +00:00
2021-06-06 20:21:26 +00:00
Route::patch('/servers/{server}/suspend', [ServerController::class, 'suspend']);
Route::patch('/servers/{server}/unsuspend', [ServerController::class, 'unSuspend']);
Route::resource('servers', ServerController::class)->except(['store', 'create', 'edit', 'update']);
});
2021-06-05 09:26:32 +00:00