fix: enviroments

This commit is contained in:
Andras Bacsai 2023-03-29 13:13:27 +02:00
parent 1c259fe12e
commit 7e47fdf52f
2 changed files with 10 additions and 12 deletions

View File

@ -23,7 +23,8 @@ public function resources()
if (!$project) {
return redirect()->route('home');
}
return view('project.resources', ['project' => $project]);
$environment = $project->environments->where('name', request()->route('environment_name'))->first();
return view('project.resources', ['project' => $project, 'environment' => $environment]);
}
public function application()
{

View File

@ -1,7 +1,5 @@
<x-layout>
<h1>Resources</h1>
@foreach ($project->environments as $environment)
<div>
@foreach ($environment->applications as $application)
<p>
@ -25,5 +23,4 @@
</p>
@endforeach
</div>
@endforeach
</x-layout>