user()->devices->contains($device), 403); $current_image_uuid = $device->current_screen_image; $current_image_path = 'images/generated/' . $current_image_uuid . '.png'; return view('livewire.devices.configure', compact('device'), [ 'image' => ($current_image_uuid) ? url($current_image_path) : null, ]); } public function deleteDevice(\App\Models\Device $device) { abort_unless(auth()->user()->devices->contains($device), 403); $device->delete(); redirect()->route('devices'); } } ?>
@php $current_image_uuid =$device->current_screen_image; file_exists('storage/images/generated/' . $current_image_uuid . '.png') ? $file_extension = 'png' : $file_extension = 'bmp'; $current_image_path = 'storage/images/generated/' . $current_image_uuid . '.' . $file_extension; @endphp

{{ $device->name }}

{{$device->updated_at->diffForHumans()}} {{$device->mac_address}} {{$device->last_firmware_version}}
{{-- Edit TRMNL--}} {{-- --}}
{{-- --}}
{{-- Save changes--}}
Delete {{$device->name}}?
Cancel Delete device
@if($current_image_uuid) Next Image @endif