add update and delete
This commit is contained in:
@ -2,8 +2,8 @@
|
||||
|
||||
@section('content')
|
||||
<form method="POST" action="/devices/{{$device->device_id}}">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
@csrf
|
||||
<label for="device_id">device_id:</label>
|
||||
<input type="text" id="device_id" name="device_id" value="{{$device->device_id}}" required>
|
||||
@error('device_id')
|
||||
@ -47,7 +47,7 @@
|
||||
@enderror
|
||||
<br />
|
||||
<label for="description">description:</label>
|
||||
<textarea type="text" id="description" name="description">{{$device->rz_username_buyer}}</textarea>
|
||||
<textarea type="text" id="description" name="description">{{$device->description}}</textarea>
|
||||
@error('device_id')
|
||||
<p>{{$message}}</p>
|
||||
@enderror
|
||||
|
@ -13,4 +13,10 @@
|
||||
<li>{{ $device['image_url'] }}</li>
|
||||
</ul>
|
||||
<button><a href="{{$device->device_id}}/edit">Edit</a></button>
|
||||
|
||||
<form method="POST" action="{{$device->device_id}}">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
<button>Delete</button>
|
||||
</form>
|
||||
@endsection
|
||||
|
Reference in New Issue
Block a user