source: resources/views/dashboard/posts/edit.blade.php@ c433da6

Last change on this file since c433da6 was 0924b6c, checked in by Özkan İliyaz <iliyaz_96@…>, 4 years ago

initial commit

  • Property mode set to 100644
File size: 3.0 KB
RevLine 
[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">Edit Post</li>
26 </ol>
27 </nav>
28
29 <div class="card-header">
30 <h3 class="card-title">Edit Post</h3>
31 </div>
32
33 <form class="actionForm" action="{{ route("dashboard.posts.edit", ["id" => $post->id]) }}" method="post" enctype="multipart/form-data" accept-charset="UTF-8">
34
35 @method("patch")
36 @csrf
37
38 <div class="row p-5">
39
40 <div class="col-md-4">
41
42 <div class="form-group">
43 <label class="form-label">Title</label>
44 <input type="text" value="{{ old("title", $post->title) }}" name="title" class="form-control" required>
45 </div>
46
47 <div class="form-group">
48 <label class="form-label">Upload Image</label>
49 <div class="custom-file">
50 <input type="file" class="custom-file-input" name="image">
51 <label class="custom-file-label">Choose file</label>
52 </div>
53 </div>
54
55 <div class="form-group">
56 <label class="form-label">Select Category</label>
57 <select name="category">
58 @foreach ($categories as $category)
59 <option value="{{ $category->id }}" {{ old("category", $post->category->id) == $category->id ? "selected" : "" }}>{{ $category->name }}</option>
60 @endforeach
61 </select>
62 </div>
63
64 <div class="form-group">
65 <label class="form-label">Select or create new tags</label>
66 <select id="postTags">
67 @foreach ($tags as $tag)
68 <option value="{{ $tag->id }}">{{ $tag->name }}</option>
69 @endforeach
70 </select>
71 <input type="hidden" name="tags" value="{{ old("tags", implode(",", $postTags)) }}">
72 </div>
73
74 </div>
75
76 <div class="col-md-8">
77 <label class="form-label">Content</label>
78 <!-- Quill rich text editor -->
79 <div id="postEditor" class="pr-5" style="height: 500px;"></div>
80 <input type="hidden" class="postContent" name="post_content" value='{{ old("post_content", $post->content) }}'>
81 </div>
82
83 <div class="col mt-5">
84 <div class="form-group border-top">
85 <div class="float-right pt-5">
86 <input type="submit" value="Edit Post" class="submitBtn submitNewPost btn btn-primary">
87 </div>
88 </div>
89 </div>
90
91 </div>
92
93 </form>
94
95 </div>
96
97 </div>
98
99 </div>
100
101 </div>
102
103 </div>
104
105@endsection
Note: See TracBrowser for help on using the repository browser.