| Server IP : 103.161.17.216 / Your IP : 216.73.216.1 Web Server : nginx/1.18.0 System : Linux tipsysaigoncharming 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 7.4.3-4ubuntu2.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/emwin.vn/resources/views/admin/post/ |
Upload File : |
@extends('admin_layout')
@section('admin_content')
<div class="row">
<div class="col-lg-12">
<section class="panel">
<header class="panel-heading">
Cập nhật bài viết
</header>
<?php
$message = Session::get('message');
if($message){
echo '<span class="text-alert">'.$message.'</span>';
Session::put('message',null);
}
?>
<div class="panel-body">
<div class="position-center">
<form role="form" action="{{URL::to('/update-post/'.$post->post_id)}}" method="post" enctype='multipart/form-data'>
{{ csrf_field() }}
<div class="form-group">
<label for="exampleInputEmail1">Tên bài viết</label>
<input type="text" name="post_title" class="form-control" onkeyup="ChangeToSlug();" minlength="2" value="{{$post->post_title}}" id="title" placeholder="Tên danh mục"required>
</div>
<div class="form-group">
<label for="exampleInputEmail1">Slug</label>
<input type="text" name="post_slug" value="{{$post->post_slug}}" class="form-control" id="slug" placeholder="Slug"required>
</div>
<div class="form-group">
<label for="exampleInputPassword1">Tóm tắt bài viết</label>
<textarea style="resize: none" rows="8" class="form-control" name="post_desc" id="ckeditor1" placeholder="Mô tả danh mục">{{$post->post_desc}}</textarea>
</div>
<div class="form-group">
<label for="exampleInputPassword1">Nội dung bài viết</label>
<textarea style="resize: none" rows="8" class="form-control" name="post_content" id="ckeditor2" placeholder="Mô tả danh mục">{{$post->post_content}}</textarea>
</div>
<div class="form-group">
<label for="exampleInputPassword1">Meta từ khóa</label>
<textarea style="resize: none" rows="5" class="form-control" name="post_meta_keywords" id="exampleInputPassword1" placeholder="Mô tả danh mục">{{$post->post_meta_keywords}}</textarea>
</div>
<div class="form-group">
<label for="exampleInputPassword1">Meta nội dung</label>
<textarea style="resize: none" rows="5" class="form-control" name="post_meta_desc" id="exampleInputPassword1" placeholder="Mô tả danh mục">{{$post->post_meta_desc}}</textarea>
</div>
<div class="form-group">
<label for="exampleInputEmail1">Hình ảnh bài viết</label>
<input type="file" name="post_image" class="form-control" id="exampleInputEmail1">
<img src="{{asset('public/uploads/post/'.$post->post_image)}}" height="100" width="100">
</div>
<div class="form-group">
<label for="exampleInputPassword1">Danh mục bài viết</label>
<select name="categorypost_id" class="form-control input-sm m-bot15">
@foreach($cate as $key => $catepost)
<option value="{{$catepost->cate_post_id}}"> {{$catepost->cate_post_name}} </option>
@foreach($categorypost as $key => $cate_pro)
@if($catepost->cate_post_id==$cate_pro->cate_post_id)
<option <?php if($cate_pro->categorypost_id==$post->categorypost_id) echo"selected"; ?> value="{{$cate_pro->categorypost_id}}">---{{$cate_pro->categorypost_name}}--- </option>
@endif
@endforeach
@endforeach
</select>
</div>
<div class="form-group">
<label for="exampleInputPassword1">Hiển thị</label>
<select name="post_status" class="form-control input-sm m-bot15">
@if($post->post_status==0)
<option selected value="0">Hiển thị</option>
<option value="1">Ẩn</option>
@else
<option value="0">Hiển thị</option>
<option selected value="1">Ẩn</option>
@endif
</select>
</div>
<button type="submit" name="update_category_product" class="btn btn-info">Cập nhật bài viết</button>
</form>
</div>
</div>
</section>
</div>
@endsection