123456789101112131415161718192021222324 |
- @extends ('layout')
- @section ('content')
- <form method='POST' action='{{ isset($post) ? route("cntrl.update", [$post['id']]) : route("cntrl.store") }}'>
- @csrf
- @if (isset($post))
- @method('put')
- @endif
- <input type='text' name='title' placeholder='Title' value='{{$post['text'] ?? ''}}'/><br/>
- <textarea name='text' placeholder='text'>{{$post['title'] ?? ''}}</textarea><br/>
- <select multiple size='3' name='tags[]'>
- @foreach($allTags as $tag)
- <option value='{{ $tag['id']}}'
- {{ array_search( $tag['id'],$postTags) > -1 ? "selected" : "" }}>{{ $tag['tag']}} </option>
- @endforeach
- </select>
- <input type='submit' />
- </form>
- @endsection
- @section ('title')
- create
- @endsection
|