33 lines
974 B
PHP
33 lines
974 B
PHP
<?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,
|
|
]);
|
|
}
|
|
}
|