@extends('admin.layout.app') @section('content') Products Products @include('admin.layout.session') @csrf Add New Product Back Category -Select category- @forelse($categories as $key => $value) id == old('category_id')? 'selected' : ''}}>{{$value->name}} @empty No Category @endforelse @if ($errors->has('category_id')) {{ $errors->first('category_id') }} @endif Product Name @if ($errors->has('name')) {{ $errors->first('name') }} @endif Default Price @if ($errors->has('default_price')) {{ $errors->first('default_price') }} @endif Old Price @if ($errors->has('old_price')) {{ $errors->first('old_price') }} @endif Product Description {{old('description')}} @if ($errors->has('description')) {{ $errors->first('description') }} @endif Product Images Drag your file orSelect {{-- Product Image Accepted formats: png, jpg, jpeg. Max file size 5Mb @if ($errors->has('product_image')) {{ $errors->first('product_image') }} @endif --}} {{-- @if(count($attributes) == 0) --}} Submit Back {{-- @endif --}} Add Attribute @include('admin.product._attribute') Submit Back {{-- @if(count($attributes) > 0) Add Attribute Attributes @forelse($attributes as $key => $attribute) id == old('attribute_id')? 'selected' : ''}}>{{$attribute->name}} @empty No Attribute @endforelse @if ($errors->has('attribute_id')) {{ $errors->first('attribute_id') }} @endif Value @forelse($attributes[0]->values as $key => $value) value == '1kg' ? 'selected' : ''}}>{{$value->value}} @empty No Attribute Value @endforelse @if ($errors->has('a_value_id')) {{ $errors->first('a_value_id') }} @endif Price @if ($errors->has('attr_price')) {{ $errors->first('attr_price') }} @endif Description {!!old('attr_description')!!} @if ($errors->has('description')) {{ $errors->first('description') }} @endif Submit Back @endif --}} @endsection @push('js') @endpush @push('js') @endpush