Contact frontend

This commit is contained in:
frederikpyt 2020-06-29 10:31:24 +02:00
parent d4abbfc189
commit 488995ca37
3 changed files with 62 additions and 0 deletions

View File

@ -0,0 +1,26 @@
@extends("admin.layout.base")
@extends("admin.layout.header")
@section("title")
Kontakter - Opret
@endsection
@section("path")
<a href="" class="text-white">Opret Kontakt</a> /
@endsection
@section("content")
<h1>Opret Kontakt:</h1>
<form method="post" action="{{ route("contacts.store") }}">
@csrf
<label for="name_first">Fornavn:</label>
<input type="text" name="name_first" id="name_first" placeholder="Fornavn" required>
<label for="name_last">Efternavn:</label>
<input type="text" name="name_last" id="name_last" placeholder="Efternavn" required>
<label for="email">Email:</label>
<input type="email" name="email" id="email" placeholder="x@y.z" required>
<label for="tel">Telefon nr:</label>
<input type="tel" name="phone" id="tel" placeholder="12345678" pattern="[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}" required>
<input type="submit" class="btn btn-dark text-white" value="Opret">
</form>
@endsection

View File

@ -0,0 +1,33 @@
@extends("admin.layout.base")
@extends("admin.layout.header")
@section("title")
Events - Vis
@endsection
@section("path")
<a href="" class="text-white">Vis Kontakter</a> /
@endsection
@section("content")
<table class="tbl">
<tr>
<th>Kontakt Navn</th>
<th>Titel</th>
<th>E-mail</th>
<th>Tlf</th>
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
</tr>
@foreach($contacts as $contact)
<tr>
<td>{{ $contact->name }}</td>
<td>{{ $contact->title }}</td>
<td>{{ $contact->email }}</td>
<td>{{ $contact->phone }}</td>
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></a></td>
</tr>
@endforeach
</table>
@endsection

View File

@ -45,6 +45,9 @@
<div class="row">
<a href="{{ route("contacts.index") }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Kontakter</a>
</div>
<div class="row">
<a href="{{ route("contacts.create") }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Kontakt</a>
</div>
</div>
</div>
<div class="w-85" style="background-color: #cccccc;">