@extends('admin.layout.admin') @section('content')

Admin Panel

@csrf @method('PUT')

Edit Product

@error('name') {{ $message }} @enderror
@error('category_id') {{ $message }} @enderror
{{-- Validation for variation errors--}} @if ($errors->any())
    @foreach ($errors->all() as $error) @if (strpos($error, 'variation') !== false)
  • {{ $error }}
  • @endif @endforeach
@endif {{-- @dd($product->variations())--}}
  • variations()->isNotEmpty()) checked @endif>

( Note: if variation is checked you should set atleast one variation.. )

@forelse($product->variations() as $index => $variation)

{{ __('Size') }}

{{ __('Color') }}

{{ __('Price') }}

@if ($index === 0) @else @endif
@empty

{{ __('Size') }}

{{ __('Color') }}

{{ __('Price') }}

@endforelse
  • features) && !is_null($product->features)) checked @endif>
@error('feature') {{ $message }} @enderror
{{--
--}} {{--
    --}} {{--
  • --}} {{-- returnPolicy)->product_id !== null) checked @endif>--}} {{-- {{ __('Return Policy') }}--}} {{-- ( If the checkbox is left unchecked,--}} {{-- it will not be eligible for return )--}} {{--
  • --}} {{--
--}} {{--
--}} {{-- --}} {{--
--}} {{-- --}} {{--
--}} {{-- @error('product_return_policy')--}} {{-- {{ $message }}--}} {{-- @enderror--}} {{--
--}}
@error('stock_quantity') {{ $message }} @enderror
@error('description') {{ $message }} @enderror
Image Preview
@error('photo') {{ $message }} @enderror
@error('gallery') {{ $message }} @enderror
@error('price') {{ $message }} @enderror
{{--PRODUCT ADD GALLERY MODAL--}}
@section('script') @endsection @endsection