12345678910111213141516171819202122232425262728293031323334353637 |
- @extends('layout')
- @section('title') single-user @endsection
- @section('content')
- <div class="user">
- {{$user->name}}
- <div style="text-align: right">
- @if ($user->role == "admin") {{$user->role}} @endif
- </div>
- </div>
- <form method="post" action="/public/posts/insert" class="new_post" style="margin-top: 20px;">
- <input type="text" style="opacity: 0; width: 0" name="user" value="{{$user->id}}">
- @csrf
- <div>
- <div style="text-align: right">
- <label>Дата публикации:</label>
- <input name="date_publication" type="date" style="width: 100%" value="{{old('date_publication')}}"/>
- @error('date_publication') <div style="color: #a9203e">{{$message}}</div> @enderror
- </div>
- <button type="submit" name="button" value="new">Опубликовать</button>
- </div>
- <textarea cols="40" rows="3" name="text" placeholder="Введите текст поста...">{{old('text')}}</textarea>
- @error('text') <div style="color: #a9203e">{{$message}}</div> @enderror
- </form>
- <div style="display: flex; flex-direction: column; gap: 20px; margin-top: 20px; margin-left: 9%;">
- @if ($posts->count() == 0) <b style="font-size: 20pt; text-decoration: underline; color: #7d324c;">Создайте свой первый пост</b>
- @else @each("posts.post", $posts, "post")
- @endif
- </div>
- @yield('action-button')
- @endsection
|