diff --git a/src/Controller/MissionController.php b/src/Controller/MissionController.php
new file mode 100644
index 0000000..123a7e2
--- /dev/null
+++ b/src/Controller/MissionController.php
@@ -0,0 +1,81 @@
+render('mission/index.html.twig', [
+ 'missions' => $missionRepository->findAll(),
+ ]);
+ }
+
+ #[Route('/new', name: '_new', methods: ['GET', 'POST'])]
+ public function new(Request $request, EntityManagerInterface $entityManager): Response
+ {
+ $mission = new Mission();
+ $form = $this->createForm(MissionType::class, $mission);
+ $form->handleRequest($request);
+
+ if ($form->isSubmitted() && $form->isValid()) {
+ $entityManager->persist($mission);
+ $entityManager->flush();
+
+ return $this->redirectToRoute('mission_index', [], Response::HTTP_SEE_OTHER);
+ }
+
+ return $this->render('mission/new.html.twig', [
+ 'mission' => $mission,
+ 'form' => $form,
+ ]);
+ }
+
+ #[Route('/{id}', name: '_show', methods: ['GET'])]
+ public function show(Mission $mission): Response
+ {
+ return $this->render('mission/show.html.twig', [
+ 'mission' => $mission,
+ ]);
+ }
+
+ #[Route('/{id}/edit', name: '_edit', methods: ['GET', 'POST'])]
+ public function edit(Request $request, Mission $mission, EntityManagerInterface $entityManager): Response
+ {
+ $form = $this->createForm(MissionType::class, $mission);
+ $form->handleRequest($request);
+
+ if ($form->isSubmitted() && $form->isValid()) {
+ $entityManager->flush();
+
+ return $this->redirectToRoute('mission_index', [], Response::HTTP_SEE_OTHER);
+ }
+
+ return $this->render('mission/edit.html.twig', [
+ 'mission' => $mission,
+ 'form' => $form,
+ ]);
+ }
+
+ #[Route('/{id}', name: '_delete', methods: ['POST'])]
+ public function delete(Request $request, Mission $mission, EntityManagerInterface $entityManager): Response
+ {
+ if ($this->isCsrfTokenValid('delete'.$mission->getId(), $request->getPayload()->getString('_token'))) {
+ $entityManager->remove($mission);
+ $entityManager->flush();
+ }
+
+ return $this->redirectToRoute('mission_index', [], Response::HTTP_SEE_OTHER);
+ }
+}
diff --git a/src/Form/MissionType.php b/src/Form/MissionType.php
new file mode 100644
index 0000000..6afd47c
--- /dev/null
+++ b/src/Form/MissionType.php
@@ -0,0 +1,25 @@
+add('label')
+ ;
+ }
+
+ public function configureOptions(OptionsResolver $resolver): void
+ {
+ $resolver->setDefaults([
+ 'data_class' => Mission::class,
+ ]);
+ }
+}
diff --git a/templates/mission/_delete_form.html.twig b/templates/mission/_delete_form.html.twig
new file mode 100644
index 0000000..6f852cd
--- /dev/null
+++ b/templates/mission/_delete_form.html.twig
@@ -0,0 +1,4 @@
+
diff --git a/templates/mission/_form.html.twig b/templates/mission/_form.html.twig
new file mode 100644
index 0000000..bf20b98
--- /dev/null
+++ b/templates/mission/_form.html.twig
@@ -0,0 +1,4 @@
+{{ form_start(form) }}
+ {{ form_widget(form) }}
+
+{{ form_end(form) }}
diff --git a/templates/mission/edit.html.twig b/templates/mission/edit.html.twig
new file mode 100644
index 0000000..b1348b1
--- /dev/null
+++ b/templates/mission/edit.html.twig
@@ -0,0 +1,13 @@
+{% extends 'base.html.twig' %}
+
+{% block title %}Edit Mission{% endblock %}
+
+{% block body %}
+ Edit Mission
+
+ {{ include('mission/_form.html.twig', {'button_label': 'Update'}) }}
+
+ back to list
+
+ {{ include('mission/_delete_form.html.twig') }}
+{% endblock %}
diff --git a/templates/mission/index.html.twig b/templates/mission/index.html.twig
new file mode 100644
index 0000000..b1fdc04
--- /dev/null
+++ b/templates/mission/index.html.twig
@@ -0,0 +1,35 @@
+{% extends 'base.html.twig' %}
+
+{% block title %}Mission index{% endblock %}
+
+{% block body %}
+ Mission index
+
+
+
+
+ Id |
+ Label |
+ actions |
+
+
+
+ {% for mission in missions %}
+
+ {{ mission.id }} |
+ {{ mission.label }} |
+
+ show
+ edit
+ |
+
+ {% else %}
+
+ no records found |
+
+ {% endfor %}
+
+
+
+ Create new
+{% endblock %}
diff --git a/templates/mission/new.html.twig b/templates/mission/new.html.twig
new file mode 100644
index 0000000..d497584
--- /dev/null
+++ b/templates/mission/new.html.twig
@@ -0,0 +1,11 @@
+{% extends 'base.html.twig' %}
+
+{% block title %}New Mission{% endblock %}
+
+{% block body %}
+ Create new Mission
+
+ {{ include('mission/_form.html.twig') }}
+
+ back to list
+{% endblock %}
diff --git a/templates/mission/show.html.twig b/templates/mission/show.html.twig
new file mode 100644
index 0000000..384ddbf
--- /dev/null
+++ b/templates/mission/show.html.twig
@@ -0,0 +1,26 @@
+{% extends 'base.html.twig' %}
+
+{% block title %}Mission{% endblock %}
+
+{% block body %}
+ Mission
+
+
+
+
+ Id |
+ {{ mission.id }} |
+
+
+ Label |
+ {{ mission.label }} |
+
+
+
+
+ back to list
+
+ edit
+
+ {{ include('mission/_delete_form.html.twig') }}
+{% endblock %}