@extends('admin.layouts.admin') @section('content')
@if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@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->image)) @php $image=$record->image @endphp @php $imageUrl=asset(Storage::url('colors/'.$record->image)) @endphp @elseif(old('image')) @php $image=old('image'); @endphp $imageUrl="" @else @php $image=''; $imageUrl="" @endphp @endif
@if(isset($record->code)) @php $code=$record->code @endphp @elseif(old('code')) @php $code=old('code'); @endphp @else @php $code=''; @endphp @endif
@if(isset($record->name)) @php $name=$record->name @endphp @elseif(old('name')) @php $name=old('name'); @endphp @else @php $name=''; @endphp @endif
@if(isset($record->alias)) @php $alias=$record->alias @endphp @elseif(old('alias')) @php $alias=old('alias'); @endphp @else @php $alias=''; @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
@endsection @push('scripts') @endpush