Initial commit
This commit is contained in:
33
resources/views/educations/_form.blade.php
Normal file
33
resources/views/educations/_form.blade.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<div class="space-y-4">
|
||||
<div>
|
||||
<label for="opleiding" class="block text-sm font-medium text-gray-700 dark:text-gray-200">Opleiding</label>
|
||||
<input type="text" id="opleiding" name="opleiding" value="{{ old('opleiding', $education->opleiding ?? '') }}" class="mt-1 w-full px-3 py-2 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="instituut" class="block text-sm font-medium text-gray-700 dark:text-gray-200">Instituut</label>
|
||||
<input type="text" id="instituut" name="instituut" value="{{ old('instituut', $education->instituut ?? '') }}" class="mt-1 w-full px-3 py-2 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded">
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label for="startdatum" class="block text-sm font-medium text-gray-700 dark:text-gray-200">Startdatum</label>
|
||||
<input type="date" id="startdatum" name="startdatum" value="{{ old('startdatum', $education->startdatum ?? '') }}" class="mt-1 w-full px-3 py-2 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="einddatum" class="block text-sm font-medium text-gray-700 dark:text-gray-200">Einddatum</label>
|
||||
<input type="date" id="einddatum" name="einddatum" value="{{ old('einddatum', $education->einddatum ?? '') }}" class="mt-1 w-full px-3 py-2 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="beschrijving" class="block text-sm font-medium text-gray-700 dark:text-gray-200">Beschrijving</label>
|
||||
<textarea id="beschrijving" name="beschrijving" rows="4" class="mt-1 w-full px-3 py-2 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded">{{ old('beschrijving', $education->beschrijving ?? '') }}</textarea>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="afbeelding" class="block text-sm font-medium text-gray-700 dark:text-gray-200">Afbeelding (optioneel)</label>
|
||||
<input type="file" id="afbeelding" name="afbeelding" class="mt-1 block w-full text-sm text-gray-500 file:bg-gray-100 file:border file:border-gray-300 file:rounded file:px-4 file:py-2 dark:file:bg-gray-800 dark:file:text-gray-300 dark:file:border-gray-600">
|
||||
</div>
|
||||
</div>
|
||||
10
resources/views/educations/create.blade.php
Normal file
10
resources/views/educations/create.blade.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<x-app-layout>
|
||||
<div class="p-6">
|
||||
<h2 class="text-2xl font-semibold text-gray-800 dark:text-white mb-4">Nieuwe Opleiding</h2>
|
||||
<form method="POST" action="{{ route('educations.store') }}" enctype="multipart/form-data">
|
||||
@csrf
|
||||
@include('educations._form')
|
||||
<button type="submit" class="mt-4 px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700">Opslaan</button>
|
||||
</form>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
11
resources/views/educations/edit.blade.php
Normal file
11
resources/views/educations/edit.blade.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<x-app-layout>
|
||||
<div class="p-6">
|
||||
<h2 class="text-2xl font-semibold text-gray-800 dark:text-white mb-4">Opleiding Bewerken</h2>
|
||||
<form method="POST" action="{{ route('educations.update', $education) }}" enctype="multipart/form-data">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
@include('educations._form')
|
||||
<button type="submit" class="mt-4 px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700">Bijwerken</button>
|
||||
</form>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
30
resources/views/educations/index.blade.php
Normal file
30
resources/views/educations/index.blade.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<x-app-layout>
|
||||
<div class="p-6">
|
||||
<h2 class="text-2xl font-semibold text-gray-800 dark:text-white mb-4">Opleidingen</h2>
|
||||
|
||||
<a href="{{ route('educations.create') }}" class="mb-4 inline-block bg-green-600 text-white px-4 py-2 rounded hover:bg-green-700">Nieuwe opleiding</a>
|
||||
|
||||
@foreach ($educations as $education)
|
||||
<div class="mb-4 p-4 bg-white dark:bg-gray-800 shadow rounded">
|
||||
<h3 class="text-xl font-bold text-gray-900 dark:text-white">{{ $education->opleiding }}</h3>
|
||||
<p class="text-gray-600 dark:text-gray-300">{{ $education->instituut }}</p>
|
||||
<p class="text-sm text-gray-500 dark:text-gray-400">{{ $education->startdatum }} – {{ $education->einddatum ?? 'heden' }}</p>
|
||||
<p class="mt-2 text-gray-700 dark:text-gray-300">{{ $education->beschrijving }}</p>
|
||||
|
||||
@if ($education->getFirstMediaUrl('afbeelding'))
|
||||
<img src="{{ $education->getFirstMediaUrl('afbeelding') }}" class="mt-4 w-32 h-auto rounded" />
|
||||
@endif
|
||||
|
||||
<div class="mt-4 space-x-2">
|
||||
<a href="{{ route('educations.edit', $education) }}" class="px-3 py-1 bg-blue-500 text-white rounded hover:bg-blue-600">Bewerk</a>
|
||||
|
||||
<form action="{{ route('educations.destroy', $education) }}" method="POST" class="inline-block" onsubmit="return confirm('Weet je zeker dat je dit wilt verwijderen?')">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button class="px-3 py-1 bg-red-600 text-white rounded hover:bg-red-700">Verwijder</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</x-app-layout>
|
||||
Reference in New Issue
Block a user