@php($lbl_food_image = __('system.fields.food_image'))
@if (isset($food) && $food->food_image_url != null) @else

{{ $food->food_image_name ?? 'F' }}

@endif
@error('food_image')

{{ $message }}

@enderror
@php($lbl_food_category = __('system.fields.food_category')) @php($categories = App\Http\Controllers\Restaurant\FoodCategoryController::getCurrentRestaurantAllFoodCategories()) {!! Form::select('categories[]', $categories, old('categories', $food->categories_ids ?? []), [ 'class' => 'form-control choice-picker-multiple w-100 ', 'id' => 'choices-multiple-remove-button', 'data-id' => 'choices-multiple-remove-button-ref', 'multiple' => true, 'placeholder' => $lbl_food_category, 'data-remove' => 'false', ]) !!} @error('categories')
{{ $message }}
@enderror
@php($lbl_food_name = __('system.fields.food_name')) {!! Form::text('name', null, [ 'class' => 'form-control', 'id' => 'name', 'placeholder' => $lbl_food_name, 'required' => 'true', 'maxlength' => 150, 'minlength' => 2, 'data-pristine-required-message' => __('validation.required', ['attribute' => strtolower($lbl_food_name)]), 'data-pristine-minlength-message' => __('validation.custom.invalid', ['attribute' => strtolower($lbl_food_name)]), ]) !!} @error('name')
{{ $message }}
@enderror @error('restaurant_id')
{{ $message }}
@enderror
@php($lbl_food_description = __('system.fields.food_description'))
{!! Form::textarea('description', null, [ 'class' => 'form-control', 'id' => 'input-address', 'placeholder' => $lbl_food_description, 'minlength' => '5', 'rows' => 2, 'required' => true, 'data-pristine-required-message' => __('validation.required', ['attribute' => strtolower($lbl_food_description)]), 'data-pristine-minlength-message' => __('validation.custom.invalid', ['attribute' => strtolower($lbl_food_description)]), ]) !!}
@error('description')
{{ $message }}
@enderror
@foreach (getAllCurrentRestaruentLanguages() as $key => $lang)
@php($lbl_food_name = __('system.fields.food_name') . ' ' . $lang) {!! Form::text("lang_name[$key]", null, [ 'class' => 'form-control', 'id' => 'name.' . $key, 'placeholder' => $lbl_food_name, 'required' => 'true', 'maxlength' => 150, 'minlength' => 2, 'data-pristine-required-message' => __('validation.required', ['attribute' => strtolower($lbl_food_name)]), 'data-pristine-minlength-message' => __('validation.custom.invalid', ['attribute' => strtolower($lbl_food_name)]), ]) !!} @error('name.' . $key)
{{ $message }}
@enderror @error('restaurant_ids.' . $key)
{{ $message }}
@enderror
@php($lbl_food_description = __('system.fields.food_description') . ' ' . $lang)
{!! Form::textarea("lang_description[$key]", null, [ 'class' => 'form-control', 'id' => 'input-address', 'placeholder' => $lbl_food_description, 'minlength' => '5', 'rows' => 2, 'required' => true, 'data-pristine-required-message' => __('validation.required', ['attribute' => strtolower($lbl_food_description)]), 'data-pristine-minlength-message' => __('validation.custom.invalid', ['attribute' => strtolower($lbl_food_description)]), ]) !!}
@error('description.' . $key)
{{ $message }}
@enderror
@endforeach
@php($lbl_food_price = __('system.fields.food_price'))
{!! Form::text('price', null, [ 'class' => 'form-control price-mask', 'id' => 'price-mask', 'placeholder' => $lbl_food_price, 'max' => '10000', 'required' => true, 'data-pristine-required-message' => __('validation.required', ['attribute' => strtolower($lbl_food_price)]), 'data-pristine-email-message' => __('validation.custom.invalid', ['attribute' => strtolower($lbl_food_price)]), ]) !!}
{{ config('app.currency_symbol') }}
@error('price')
{{ $message }}
@enderror
@php($lbl_preparation_time = __('system.fields.preparation_time'))
{!! Form::text('preparation_time', isset($food) && $food->preparation_time ? str_replace([' hours ', 'minutes'], ['.', ''], $food->preparation_time) : null, [ 'class' => 'form-control', 'id' => 'preparation_time', 'placeholder' => $lbl_preparation_time, 'required' => 'true', 'data-pristine-required-message' => __('validation.required', ['attribute' => strtolower($lbl_preparation_time)]), ]) !!} @error('preparation_time')
{{ $message }}
@enderror
@php($lbl_is_available = __('system.fields.is_available'))
{!! Form::checkbox('is_available', 1, null, [ 'class' => 'form-check-input', 'id' => 'is_available', 'placeholder' => $lbl_is_available, ]) !!}