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'); } } ?>