view.blade.php 2.15 KB
@extends('layout.admin', ['title' => 'Просмотр новости'])

@section('content')
    <section class="favorites">
        <div class="favorites-top">
            <div class="container">
                <div class="breadcrumbs">
                    <ul class="breadcrumbs__list">
                        <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="{{ route('user.index') }}">Главная</a></li>
                        <li class="breadcrumbs__item"><a class="breadcrumbs__link" href="{{ route('admin.news.index') }}">Новости </a></li>
                        <li class="breadcrumbs__item"><span class="breadcrumbs__link">Просмотр новости </span></li>
                    </ul>
                </div>
                <h1 class="favorites__title title-main">Просмотр новости</h1>
            </div>
        </div>
        <div class="favorites-cnt">
            <div class="container">
                <label for="name_area">Заголовок новости: <span class="req">*</span></label>
                <input type="text" class="form-control_ txt" name="title" placeholder="Заголовок новости"
                       required maxlength="100" style="width: 80%" value="{{ old('title') ?? $news->title ?? '' }}"><br>

                <label for="text">Текст новости: <span class="req">*</span></label>
                <textarea class="form-control_ txtarea ckeditor" name="text" placeholder="Текст новости" required
                          rows="10" style="width: 80%">{{ old('text') ?? $news->text ?? '' }}</textarea><br>

                <label for="foto">Файл-картинка:</label>
                @isset($news->foto)
                    <div class="form-group form-check">
                        <img src="/storage/app/public/<?=$news->foto;//=asset(Storage::url($news->foto))?>" width="100px"/>
                    </div>
                @endisset
                <br><br>
                <a href="{{ route('admin.news.index') }}" class="btn hero-search__btn btn--main">Вернуться к новостям</a>
            </div>
        </div>
    </section>
@endsection