basic frontend

This commit is contained in:
TimmensOne 2023-03-24 16:51:30 +01:00
parent 68735a3af7
commit 665916d05f
4 changed files with 62 additions and 20 deletions

View File

@ -1,9 +1,15 @@
@extends('layout')
@section('content')
<h1>Device Detail</h1>
<h2>{{ $device['device_id'] }}</h2>
<h2>{{ $device['title'] }}</h2>
<h2>{{ $device['device_type'] }}</h2>
<h2>{{ $device['description'] }}</h2>
<h2>{{ $device['accessories'] }}</h2>
<h2>{{ $device['rz_username_buyer'] }}</h2>
<h2>{{ $device['serial_number'] }}</h2>
<h2>{{ $device['image_url'] }}</h2>
<ul>
<li>{{ $device['device_id'] }}</li>
<li>{{ $device['title'] }}</li>
<li>{{ $device['device_type'] }}</li>
<li>{{ $device['description'] }}</li>
<li>{{ $device['accessories'] }}</li>
<li>{{ $device['rz_username_buyer'] }}</li>
<li>{{ $device['serial_number'] }}</li>
<li>{{ $device['image_url'] }}</li>
</ul>
@endsection

View File

@ -1,10 +1,16 @@
@extends('layout')
@section('content')
<h1>Device List</h1>
@unless(count($devices) == 0)
<ul>
@foreach ($devices as $device)
<h2>
<a href="/devices/{{ $device['device_id'] }}">{{$device['title']}}</<a>
</h2>
<li>
<a href="/devices/{{ $device['device_id'] }}">{{ $device->title }}</a>
</li>
@endforeach
</ul>
@else
<p>No devices</p>
<p>No devices found</p>
@endunless
@endsection

View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<title>Device Manager</title>
</head>
<body>
<nav>
<ul>
<li><a href="/">Home</a></li>
</ul>
</nav>
<main>
<h1>Device Manager</h1>
<div class="container">
@yield('content')
</div>
</main>
<footer>
<p>&copy; 2023 My Website. All rights reserved.</p>
</footer>
</body>
</html>

View File

@ -1 +1,6 @@
@extends('layout')
@section('content')
<h1>Welcome</h1>
<a href="/devices">To List</a>
@endsection