Add platform admin hosting API for Ladill account provisioning.
Deploy Ladill Hosting / deploy (push) Successful in 1m29s

Expose authenticated service endpoints for assigning, listing, renewing, and managing hosting accounts from the platform, with tests and deploy docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-03 22:54:00 +00:00
co-authored by Cursor
parent b0e1cfab4e
commit 2c9877a87c
14 changed files with 806 additions and 66 deletions
+15
View File
@@ -1,9 +1,24 @@
<?php
use App\Http\Controllers\Api\PlatformHostingController;
use App\Services\Mailbox\MailboxClient;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
Route::middleware('auth.service:platform')->prefix('platform')->group(function (): void {
Route::get('/hosting-products', [PlatformHostingController::class, 'products']);
Route::get('/users/{publicId}/hosting-accounts', [PlatformHostingController::class, 'index'])
->where('publicId', '[A-Za-z0-9\-]+');
Route::post('/users/{publicId}/hosting-accounts', [PlatformHostingController::class, 'assign'])
->where('publicId', '[A-Za-z0-9\-]+');
Route::patch('/hosting-accounts/{account}/duration', [PlatformHostingController::class, 'updateDuration'])
->whereNumber('account');
Route::post('/hosting-accounts/{account}/renew', [PlatformHostingController::class, 'renew'])
->whereNumber('account');
Route::post('/hosting-accounts/{account}/unsuspend', [PlatformHostingController::class, 'unsuspend'])
->whereNumber('account');
});
// Ladill Email API (v1) — authenticated with Sanctum personal access tokens
// minted on the Developers page. Read-only for now: identity + mailboxes.
Route::middleware('auth:sanctum')->prefix('v1')->group(function () {