@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->fabrics)) @php $fabric_ids=$record->fabrics->pluck('id')->toArray() @endphp @elseif(old('fabric_ids')) @php $fabric_ids=old('fabric_ids'); @endphp @else @php $fabric_ids=[]; @endphp @endif
@if(isset($record->necklines)) @php $neckline_ids=$record->necklines->pluck('id')->toArray() @endphp @elseif(old('neckline_ids')) @php $neckline_ids=old('neckline_ids'); @endphp @else @php $neckline_ids=[]; @endphp @endif
@if(isset($record->silhouettes)) @php $silhouette_ids=$record->silhouettes->pluck('id')->toArray() @endphp @elseif(old('silhouette_ids')) @php $silhouette_ids=old('silhouette_ids'); @endphp @else @php $silhouette_ids=[]; @endphp @endif
@if(isset($record->brands)) @php $brand_ids=$record->brands->pluck('id')->toArray() @endphp @elseif(old('brand_ids')) @php $brand_ids=old('brand_ids'); @endphp @else @php $brand_ids=[]; @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