implement uuid and make sample data factory
This commit is contained in:
@@ -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')
|
||||
|
@@ -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')
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user