{{-- Вьюха: форма создания/редактирования услуги --}} @extends('admin.layout') @section('title', $service->exists ? 'Редактировать услугу' : 'Новая услуга') @section('content_header')

{{ $service->exists ? 'Услуга: ' . $service->title : 'Новая услуга' }}

Назад
@stop @section('breadcrumb') @stop @section('content') @if($service->exists)
@method('PUT') @else @endif @csrf
{{-- Левая колонка --}}

Основное

@error('title')
{{ $message }}
@enderror
@if($service->exists)
Публичный адрес: /services/{{ $service->slug }}
@endif
Одна emoji — отображается в блоке услуг
@error('excerpt')
{{ $message }}
@enderror
@php $countriesSection = \App\Models\DictSection::where('code','countries')->first(); $tagsSection = \App\Models\DictSection::where('code','service_tags')->first(); $allCountries = $countriesSection ? \App\Models\DictValue::where('section_id',$countriesSection->id)->orderBy('sort_order')->get() : collect(); $allServiceTags = $tagsSection ? \App\Models\DictValue::where('section_id',$tagsSection->id)->orderBy('sort_order')->get() : collect(); $selectedTagIds = array_map('intval', old('tags', $service->tags ?? [])); @endphp
Выбирайте из справочника — страны и функциональные метки @if($allCountries->isNotEmpty())
Страны
@foreach($allCountries as $country)
id, $selectedTagIds))>
@endforeach
@endif @if($allServiceTags->isNotEmpty())
Метки услуг
@foreach($allServiceTags as $tag)
id, $selectedTagIds))>
@endforeach
@endif

Полное описание

Отображается на детальной странице /services/{{ $service->slug ?: '{slug}' }} @error('description')
{{ $message }}
@enderror
{{-- Правая колонка --}}

Публикация

is_active ?? true) ? 'checked' : '' }}>
Чем меньше — тем выше в списке
@stop