Implement Keystone environment deployments
This commit is contained in:
32
app/Http/Controllers/EnvironmentController.php
Normal file
32
app/Http/Controllers/EnvironmentController.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Organisation;
|
||||
use Illuminate\Http\Request;
|
||||
use Inertia\Response;
|
||||
|
||||
class EnvironmentController extends Controller
|
||||
{
|
||||
public function show(Request $request): Response
|
||||
{
|
||||
$organisation = Organisation::findOrFail($request->route('organisation'));
|
||||
$application = $organisation->applications()->findOrFail($request->route('application'));
|
||||
$environment = $application->environments()
|
||||
->with([
|
||||
'services.replicas',
|
||||
'services.slices',
|
||||
'services.operations.steps',
|
||||
'attachments.service',
|
||||
'attachments.serviceSlice',
|
||||
'variables',
|
||||
'operations.steps',
|
||||
])
|
||||
->findOrFail($request->route('environment'));
|
||||
|
||||
return inertia('environments/Show', [
|
||||
'application' => $application,
|
||||
'environment' => $environment,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user