implement uuid and make sample data factory

This commit is contained in:
TimmensOne
2023-03-30 15:16:38 +02:00
parent 656056a3b3
commit 6894c2c3c5
25 changed files with 202 additions and 81 deletions

View File

@@ -3,12 +3,12 @@
@section('content')
<form method="POST" action="/devices">
@csrf
<label for="device_id">device_id:</label>
<!--label for="device_id">device_id:</label>
<input type="text" id="device_id" name="device_id" value="{{old('device_id')}}" required>
@error('device_id')
<p>{{$message}}</p>
@enderror
<br />
<br /-->
<label for="title">Title:</label>
<input type="text" id="title" name="title" value="{{old('title')}}" required>
@error('device_id')

View File

@@ -4,12 +4,12 @@
<form method="POST" action="/devices/{{$device->device_id}}">
@method('PUT')
@csrf
<label for="device_id">device_id:</label>
<!--label for="device_id">device_id:</label>
<input type="text" id="device_id" name="device_id" value="{{$device->device_id}}" required>
@error('device_id')
<p>{{$message}}</p>
@enderror
<br />
<br /-->
<label for="title">Title:</label>
<input type="text" id="title" name="title" value="{{$device->title}}" required>
@error('device_id')

View File

@@ -5,7 +5,7 @@
@unless(count($devices) == 0)
<ul>
@foreach ($devices as $device)
<x-device-card :device="$device" />
<x-device-simple :device="$device" />
@endforeach
</ul>
@else

View File

@@ -1,10 +1,9 @@
@extends('layout')
@section('content')
<h1>Device Detail</h1>
<button><a href="{{$device->device_id}}/edit">Edit</a></button>
<x-device-detail :device="$device" />
<button><a href="{{$device->device_id}}/edit">Edit</a></button>
<form method="POST" action="{{$device->device_id}}">
@method('DELETE')
@csrf