[0924b6c] | 1 | @extends("layouts.dashboard")
|
---|
| 2 |
|
---|
| 3 | @section("title", "Add new post - Dashboard | TechnoBlog")
|
---|
| 4 |
|
---|
| 5 | @section("dashboard_content")
|
---|
| 6 |
|
---|
| 7 | <div class="my-3 my-md-5">
|
---|
| 8 |
|
---|
| 9 | <div class="container">
|
---|
| 10 |
|
---|
| 11 | <div class="row">
|
---|
| 12 |
|
---|
| 13 | <div class="col-sm-12">
|
---|
| 14 |
|
---|
| 15 | <div class="card">
|
---|
| 16 |
|
---|
| 17 | <nav aria-label="breadcrumb">
|
---|
| 18 | <ol class="breadcrumb" style="border-radius: 0px !important;">
|
---|
| 19 | <li class="breadcrumb-item">
|
---|
| 20 | <a href="{{ route("dashboard.index") }}">Dashboard</a>
|
---|
| 21 | </li>
|
---|
| 22 | <li class="breadcrumb-item">
|
---|
| 23 | <a href="{{ route("dashboard.posts.index") }}">Posts</a>
|
---|
| 24 | </li>
|
---|
| 25 | <li class="breadcrumb-item active" aria-current="page">Add New</li>
|
---|
| 26 | </ol>
|
---|
| 27 | </nav>
|
---|
| 28 |
|
---|
| 29 | <div class="card-header">
|
---|
| 30 | <h3 class="card-title">Add new post</h3>
|
---|
| 31 | </div>
|
---|
| 32 |
|
---|
| 33 | <form class="actionForm" action="{{ route("dashboard.posts.store") }}" method="post" enctype="multipart/form-data" accept-charset="UTF-8">
|
---|
| 34 |
|
---|
| 35 | @csrf
|
---|
| 36 |
|
---|
| 37 | <div class="row p-5">
|
---|
| 38 |
|
---|
| 39 | <div class="col-md-4">
|
---|
| 40 |
|
---|
| 41 | <div class="form-group">
|
---|
| 42 | <label class="form-label">Title</label>
|
---|
| 43 | <input type="text" value="{{ old("title") }}" name="title" class="form-control" required>
|
---|
| 44 | </div>
|
---|
| 45 |
|
---|
| 46 | <div class="form-group">
|
---|
| 47 | <label class="form-label">Upload Image</label>
|
---|
| 48 | <div class="custom-file">
|
---|
| 49 | <input type="file" class="custom-file-input" name="image" required>
|
---|
| 50 | <label class="custom-file-label">Choose file</label>
|
---|
| 51 | </div>
|
---|
| 52 | </div>
|
---|
| 53 |
|
---|
| 54 | <div class="form-group">
|
---|
| 55 | <label class="form-label">Select Category</label>
|
---|
| 56 | <select name="category">
|
---|
| 57 | @foreach ($categories as $category)
|
---|
| 58 | <option value="{{ $category->id }}" {{ (old("category") == $category->id ? "selected" : "") }}>{{ $category->name }}</option>
|
---|
| 59 | @endforeach
|
---|
| 60 | </select>
|
---|
| 61 | </div>
|
---|
| 62 |
|
---|
| 63 | <div class="form-group">
|
---|
| 64 | <label class="form-label">Select or create new tags</label>
|
---|
| 65 | <select id="postTags">
|
---|
| 66 | @foreach ($tags as $tag)
|
---|
| 67 | <option value="{{ $tag->id }}">{{ $tag->name }}</option>
|
---|
| 68 | @endforeach
|
---|
| 69 | </select>
|
---|
| 70 | <input type="hidden" name="tags" value="{{ old("tags") }}">
|
---|
| 71 | </div>
|
---|
| 72 |
|
---|
| 73 | </div>
|
---|
| 74 |
|
---|
| 75 | <div class="col-md-8">
|
---|
| 76 | <label class="form-label">Content</label>
|
---|
| 77 | <!-- Quill rich text editor -->
|
---|
| 78 | <div id="postEditor" class="pr-5" style="height: 500px;"></div>
|
---|
| 79 | <input type="hidden" class="postContent" name="post_content" value='{{ old("post_content") }}'>
|
---|
| 80 | </div>
|
---|
| 81 |
|
---|
| 82 | <div class="col mt-5">
|
---|
| 83 | <div class="form-group border-top">
|
---|
| 84 | <div class="float-right pt-5">
|
---|
| 85 | <input type="submit" value="{{ auth()->user()->hasPermission("publish_post") ? "Create Post" : "Submit post for review" }}" class="submitBtn submitNewPost btn btn-primary">
|
---|
| 86 | </div>
|
---|
| 87 | </div>
|
---|
| 88 | </div>
|
---|
| 89 |
|
---|
| 90 | </div>
|
---|
| 91 |
|
---|
| 92 | </form>
|
---|
| 93 |
|
---|
| 94 | </div>
|
---|
| 95 |
|
---|
| 96 | </div>
|
---|
| 97 |
|
---|
| 98 | </div>
|
---|
| 99 |
|
---|
| 100 | </div>
|
---|
| 101 |
|
---|
| 102 | </div>
|
---|
| 103 |
|
---|
| 104 | @endsection
|
---|