@extends('admin.layouts.admin') @section('content')
@if($action == 'Edit')
@else @endif @csrf
@if(isset($record->id)) @php $id=$record->id @endphp @else @php $id=0; @endphp @endif
{{ $title }}
@if(isset($record->product_code)) @php $product_code=$record->product_code @endphp @elseif(old('product_code')) @php $product_code=old('product_code'); @endphp @else @php $product_code=''; @endphp @endif
@if(isset($record->categories)) @php $cat_ids=$record->categories->pluck('id')->toArray() @endphp @elseif(old('cat_ids')) @php $cat_ids=old('cat_ids'); @endphp @else @php $cat_ids=[]; @endphp @endif
@if(isset($record->seasons)) @php $season_ids=$record->seasons->pluck('id')->toArray() @endphp @elseif(old('season_ids')) @php $season_ids=old('season_ids'); @endphp @else @php $season_ids=[]; @endphp @endif
@if(isset($record->fabric_id)) @php $fabric_id = $record->fabric_id @endphp @elseif(old('fabric_id')) @php $fabric_id = old('fabric_id'); @endphp @else @php $fabric_id = 0; @endphp @endif
@if(isset($record->neckline_id )) @php $neckline_id =$record->neckline_id @endphp @elseif(old('neckline_id ')) @php $neckline_id =old('neckline_id '); @endphp @else @php $neckline_id =0; @endphp @endif
@if(isset($record->silhouette_id)) @php $silhouette_id = $record->silhouette_id @endphp @elseif(old('silhouette_id')) @php $silhouette_id = old('silhouette_id'); @endphp @else @php $silhouette_id = 0; @endphp @endif
@if(isset($record->brand_id )) @php $brand_id =$record->brand_id @endphp @elseif(old('brand_id ')) @php $brand_id =old('brand_id '); @endphp @else @php $brand_id =0; @endphp @endif
@if(isset($record->rank)) @php $rank=$record->rank @endphp @elseif(old('rank')) @php $rank=old('rank'); @endphp @else @php $rank=''; @endphp @endif
@if(isset($record->active)) @php $active=$record->active @endphp @elseif(old('active')) @php $active=old('active'); @endphp @else @php $active=1; @endphp @endif
@if(isset($record->description)) @php $description=$record->description @endphp @elseif(old('description')) @php $description=old('description'); @endphp @else @php $description=''; @endphp @endif
Product Sizes
@php $from_id=0 @endphp @if(isset($record) && count($record->normal_sizes)>0) @php $from_id=$record->normal_sizes->first()->id @endphp @endif
@php $to_id=0 @endphp @if(isset($record) && count($record->normal_sizes)>0) @php $to_id=$record->normal_sizes->last()->id @endphp @endif
Product Plus Sizes
@php $from_plus_id=0 @endphp @if(isset($record) && count($record->plus_sizes)>0) @php $from_plus_id=$record->plus_sizes->first()->id @endphp @endif
@php $to_plus_id=0 @endphp @if(isset($record) && count($record->plus_sizes)>0) @php $to_plus_id=$record->plus_sizes->last()->id @endphp @endif
Product SEO Detail
@if(isset($record->meta_title)) @php $meta_title=$record->meta_title @endphp @elseif(old('meta_title')) @php $meta_title=old('meta_title'); @endphp @else @php $meta_title=''; @endphp @endif
@if(isset($record->meta_keywords)) @php $meta_keywords=$record->meta_keywords @endphp @elseif(old('meta_keywords')) @php $meta_keywords=old('meta_keywords'); @endphp @else @php $meta_keywords=''; @endphp @endif
@if(isset($record->og_title)) @php $og_title=$record->og_title @endphp @elseif(old('og_title')) @php $og_title=old('og_title'); @endphp @else @php $og_title=''; @endphp @endif
@if(isset($record->meta_description)) @php $meta_description=$record->meta_description @endphp @elseif(old('meta_description')) @php $meta_description=old('meta_description'); @endphp @else @php $meta_description=''; @endphp @endif
@if(isset($record->og_description)) @php $og_description=$record->og_description @endphp @elseif(old('og_description')) @php $og_description=old('og_description'); @endphp @else @php $og_description=''; @endphp @endif
@if(isset($record)) @foreach($record->variations as $variation) @include('admin.product.product_variation',['title'=>'New Variation','colors'=>$colors,'record'=>$variation]) @endforeach @else @include('admin.product.product_variation',['title'=>'New Variation','colors'=>$colors]) @endif
@endsection @push('scripts') @endpush