@section('title', $notice ? 'Editar comunicado' : 'Novo comunicado') @section('head') @endsection @include('admin/includes/header') @php use App\Services\Notices; $kinds = [1 => 'Novidade', 2 => 'Aviso', 3 => 'Concluído']; $langs = [ 'pt' => ['label' => 'Português', 'short' => 'PT', 'sufix' => ''], 'en' => ['label' => 'Inglês', 'short' => 'EN', 'sufix' => '_en'], 'es' => ['label' => 'Espanhol', 'short' => 'ES', 'sufix' => '_es'], ]; $audience = old('lang', $notice->lang ?? 'all'); $ends = $notice && $notice->end_at ? date('Y-m-d', strtotime($notice->end_at)) : ''; $running = $notice ? Notices::running($notice) : true; $kind = (int) old('type', $notice->type ?? 1); @endphp
Comunicados

{{ $notice ? Notices::label($notice) : 'Novo comunicado' }}

O cliente vê o título e a descrição breve no sino. O texto inteiro abre na página do aviso.

@if($notice) {{ $notice->status == '1' ? ($running ? 'No ar' : 'Encerrado') : 'Rascunho' }} @endif
@if (\Session::has('success'))
{!! \Session::get('success') !!}
@php Session::forget('success'); @endphp @endif @if (isset($errors) && $errors->any())
{{ $errors->count() == 1 ? 'Há um campo para corrigir:' : 'Há campos para corrigir:' }} {{ implode(' ', $errors->all()) }}
@endif
@csrf

Texto do comunicado

@foreach($langs as $code => $lang) @endforeach
@foreach($langs as $code => $lang)
Como fica no sino
agora
@endforeach
@if($notice)
Ver como o cliente vê
@endif
@include('admin/includes/footer')