Skip to content

Commit d70d96d

Browse files
old data keep
1 parent ac8785c commit d70d96d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

resources/views/create_post.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@
2222
@csrf
2323
<div class="form-group">
2424
<label for="">Title</label>
25-
<input type="text" class="form-control {{ ($errors->has('title'))?'is-invalid':'' }}" name="title" placeholder="Enter title...">
25+
<input type="text" class="form-control {{ ($errors->has('title'))?'is-invalid':'' }}" name="title" value="{{ old('title') }}" placeholder="Enter title...">
2626
@if($errors->has('title'))
2727
<span class="text-danger">{{ $errors->first('title') }}</span>
2828
@endif
2929
</div>
3030
<div class="form-group">
3131
<label for="">Category</label>
32-
<input type="text" class="form-control {{ ($errors->has('category'))?'is-invalid':'' }}" name="category" placeholder="Enter category...">
32+
<input type="text" class="form-control {{ ($errors->has('category'))?'is-invalid':'' }}" name="category" value="{{ old('category') }}" placeholder="Enter category...">
3333
@if($errors->has('category'))
3434
<span class="text-danger">{{ $errors->first('category') }}</span>
3535
@endif
3636
</div>
3737
<div class="form-group">
3838
<label for="">Description</label>
39-
<textarea class="form-control {{ ($errors->has('description'))?'is-invalid':'' }}" name="description" placeholder="Enter description..."></textarea>
39+
<textarea class="form-control {{ ($errors->has('description'))?'is-invalid':'' }}" name="description" value="{{ old('description') }}" placeholder="Enter description..."></textarea>
4040
@if($errors->has('description'))
4141
<span class="text-danger">{{ $errors->first('description') }}</span>
4242
@endif

0 commit comments

Comments
 (0)