@extends('admin.layouts.main') @section('content')

{{ trans('messages.Add Package') }}

{!! Form::open([ 'method' => 'PUT', 'route' => ['theoryPackage.update', $theoryPackage->id], 'files' => true, 'id' => 'edit-theoryPackage-form', ]) !!}
{!! Form::text('name_ar', $theoryPackage->name_ar, [ 'class' => 'form-control', 'placeholder' => trans('messages.Name Ar'), ]) !!}
@error('name_ar')
{{ $message }}
@enderror
{!! Form::textarea('short_desc_ar', $theoryPackage->short_desc_ar, [ 'class' => 'form-control', 'placeholder' => trans('messages.Notes Ar'), ]) !!}
@error('short_desc_ar')
{{ $message }}
@enderror
{!! Form::textarea('notes_ar', $theoryPackage->notes_ar, [ 'id' => 'editor1', 'class' => 'form-control', 'placeholder' => trans('messages.Notes Ar'), ]) !!}
@error('notes_ar')
{{ $message }}
@enderror
{!! Form::text('name_en', $theoryPackage->name_en, [ 'class' => 'form-control', 'placeholder' => trans('messages.Name EN'), ]) !!}
@error('name_en')
{{ $message }}
@enderror
{!! Form::textarea('short_desc_en', $theoryPackage->short_desc_en, [ 'class' => 'form-control', 'placeholder' => trans('messages.Notes EN'), ]) !!}
@error('short_desc_en')
{{ $message }}
@enderror
{!! Form::textarea('notes_en', $theoryPackage->notes_en, [ 'id' => 'editoren', 'class' => 'form-control', 'placeholder' => trans('messages.Notes EN'), ]) !!}
@error('notes_en')
{{ $message }}
@enderror
{!! Form::text('name_nl', $theoryPackage->name_nl, [ 'class' => 'form-control', 'placeholder' => trans('messages.Name Nl'), ]) !!}
@error('name_nl')
{{ $message }}
@enderror
{!! Form::textarea('short_desc_nl', $theoryPackage->short_desc_nl, [ 'class' => 'form-control', 'placeholder' => trans('messages.Notes Nl'), ]) !!}
@error('short_desc_nl')
{{ $message }}
@enderror
{!! Form::textarea('notes_nl', $theoryPackage->notes_nl, [ 'id' => 'editor2', 'class' => 'form-control', 'placeholder' => trans('messages.Notes Nl'), ]) !!}
@error('notes_nl')
{{ $message }}
@enderror
في حاله اختيار طريقة العرض ( نص ) سوف يتم عرض هذه الصور
@if (!empty($theoryPackage->image) && file_exists(public_path() . '/' . $theoryPackage->image)) @if (in_array(pathinfo($theoryPackage->image, PATHINFO_EXTENSION), ['JPG', 'jpg', 'jpeg', 'gif', 'png', 'bmp'])) @else @endif @else @endif
@error('image')
{{ $message }}
@enderror
@if (!empty($theoryPackage->photo_phone) && file_exists(public_path() . '/' . $theoryPackage->photo_phone)) @if (in_array(pathinfo($theoryPackage->photo_phone, PATHINFO_EXTENSION), ['JPG', 'jpg', 'jpeg', 'gif', 'png', 'bmp'])) @else @endif @else @endif
@error('photo_desktop')
{{ $message }}
@enderror
{!! Form::number('price', $theoryPackage->price, [ 'class' => 'form-control', 'placeholder' => trans('messages.Price'), ]) !!}
@error('price')
{{ $message }}
@enderror
{!! Form::number('expiration_duration_in_dayes', $theoryPackage->expiration_duration_in_dayes, [ 'class' => 'form-control', 'placeholder' => trans('messages.Expiration duration'), ]) !!}
@error('expiration_duration_in_dayes')
{{ $message }}
@enderror
{!! Form::number('arrangement', $theoryPackage->arrangement, [ 'class' => 'form-control', 'placeholder' => trans('messages.Expiration duration'), ]) !!}
@error('arrangement')
{{ $message }}
@enderror
{!! Form::color('color_background', $theoryPackage->color_background, [ 'class' => 'form-control', ]) !!}
@error('color_background')
{{ $message }}
@enderror
{!! Form::color('color_border', $theoryPackage->color_border, [ 'class' => 'form-control', ]) !!}
@error('color_border')
{{ $message }}
@enderror
{!! Form::checkbox('show_in_home', null, $theoryPackage->show_in_home, ['id' => 'show_in_home']) !!}
{!! Form::checkbox('enable', null, $theoryPackage->enable, ['id' => 'Checkbox_1']) !!}
@if (!empty($theoryPackage->cove_desktop_ar) && file_exists(public_path() . '/' . $theoryPackage->cove_desktop_ar)) @if (in_array(pathinfo($theoryPackage->cove_desktop_ar, PATHINFO_EXTENSION), [ 'JPG', 'jpg', 'jpeg', 'gif', 'png', 'bmp', ])) @else @endif @else @endif
@error('cove_desktop_ar')
{{ $message }}
@enderror
@if (!empty($theoryPackage->cove_phone_ar) && file_exists(public_path() . '/' . $theoryPackage->cove_phone_ar)) @if (in_array(pathinfo($theoryPackage->cove_phone_ar, PATHINFO_EXTENSION), ['JPG', 'jpg', 'jpeg', 'gif', 'png', 'bmp'])) @else @endif @else @endif
@error('cove_phone_ar')
{{ $message }}
@enderror
@if (!empty($theoryPackage->cove_desktop_en) && file_exists(public_path() . '/' . $theoryPackage->cove_desktop_en)) @if (in_array(pathinfo($theoryPackage->cove_desktop_en, PATHINFO_EXTENSION), [ 'JPG', 'jpg', 'jpeg', 'gif', 'png', 'bmp', ])) @else @endif @else @endif
@error('cove_desktop_en')
{{ $message }}
@enderror
@if (!empty($theoryPackage->cove_phone_en) && file_exists(public_path() . '/' . $theoryPackage->cove_phone_en)) @if (in_array(pathinfo($theoryPackage->cove_phone_en, PATHINFO_EXTENSION), ['JPG', 'jpg', 'jpeg', 'gif', 'png', 'bmp'])) @else @endif @else @endif
@error('cove_phone_en')
{{ $message }}
@enderror
@if (!empty($theoryPackage->cove_desktop_nl) && file_exists(public_path() . '/' . $theoryPackage->cove_desktop_nl)) @if (in_array(pathinfo($theoryPackage->cove_desktop_nl, PATHINFO_EXTENSION), [ 'JPG', 'jpg', 'jpeg', 'gif', 'png', 'bmp', ])) @else @endif @else @endif
@error('cove_desktop_nl')
{{ $message }}
@enderror
@if (!empty($theoryPackage->cove_phone_nl) && file_exists(public_path() . '/' . $theoryPackage->cove_phone_nl)) @if (in_array(pathinfo($theoryPackage->cove_phone_nl, PATHINFO_EXTENSION), ['JPG', 'jpg', 'jpeg', 'gif', 'png', 'bmp'])) @else @endif @else @endif
@error('cove_phone_en')
{{ $message }}
@enderror

{{ trans('messages.Select Countries') }}

@foreach ($countries as $country) @php $columnName = 'country_' . $country->code; $isChecked = isset($theoryPackage->$columnName) && $theoryPackage->$columnName == 1; @endphp
@endforeach
{!! Form::Close() !!}
@endsection @section('script') @endsection