@extends('layouts.app') @section('content')

✏️ Edit Gadget

{{-- Errors --}} @if ($errors->any())
@endif
@csrf @method('PUT') {{-- Basic Info --}} {{-- Image --}}
@if ($gadget->image) @endif
{{-- Descriptions --}}
{{-- PROS --}}
Pros
@php $pros = is_array($gadget->pros) ? $gadget->pros : json_decode($gadget->pros, true); @endphp
@foreach ($pros ?? [''] as $pro) @endforeach

{{-- CONS --}}
Cons
@php $cons = is_array($gadget->cons) ? $gadget->cons : json_decode($gadget->cons, true); @endphp
@foreach ($cons ?? [''] as $con) @endforeach
{{-- SPECS --}}
🧠 Spec Builder
@php $specs = is_array($gadget->specs) ? $gadget->specs : json_decode($gadget->specs, true); @endphp
@if ($specs) @foreach ($specs as $key => $value)
@endforeach @else {{-- Default empty row --}}
@endif
{{-- Featured --}}
{{-- SCRIPTS --}} @endsection