관리-도구
편집 파일: show.blade.php
@extends('layouts.app') @section('content') <!-- ============================================================== --> <!-- Page wrapper --> <!-- ============================================================== --> <div class="page-wrapper"> <!-- ============================================================== --> <!-- Container fluid --> <!-- ============================================================== --> <div class="container-fluid"> <!-- ============================================================== --> <!-- Bread crumb and right sidebar toggle --> <!-- ============================================================== --> <div class="row page-titles"> <div class="col-md-5 align-self-center"> <h4 class="text-themecolor">Update Blog</h4> </div> <div class="col-md-7 align-self-center text-end"> <div class="d-flex justify-content-end align-items-center"> <ol class="breadcrumb justify-content-end"> <li class="breadcrumb-item"><a href="{{ url('/adminpan') }}">Home</a></li> <li class="breadcrumb-item active">Update Blog</li> </ol> <form action="{{ route('createBlog') }}"> <button type="submit" class="btn btn-info d-none d-lg-block m-l-15 text-white"><i class="fa fa-plus-circle"></i> Create New</button></form> </div> </div> </div> <!-- ============================================================== --> <!-- End Bread crumb and right sidebar toggle --> <!-- ============================================================== --> <!-- ============================================================== --> <!-- Start Page Content --> <!-- ============================================================== --> <!-- Row --> <div class="row"> <!-- Column --> <!-- Column --> <!-- Column --> <div class="col-lg-8 col-xlg-9 col-md-7"> <div class="card"> <!-- Nav tabs --> <ul class="nav nav-tabs profile-tab" role="tablist"> </ul> <div class="tab-content"> <div class="tab-pane active" id="home" role="tabpanel"> <div class="card-body"> </div> </div> <div class="" id="settings" role="tabpanel"> <div class="card-body"> <form action="{{ route('blogUpdate') }}" method="POST" enctype="multipart/form-data"> @csrf <input type="hidden" name="id" value={{$singleData->id}}> <div class="form-group"> <label class="col-md-12">blog Main Heading</label> <div class="col-md-12"> <input type="text" placeholder="Enter blog Main Heading" class="form-control form-control-line" name="title" value="{{ $singleData->title }}" required> </div> </div> <div class="form-group"> <label class="col-md-12">blog Sub Heading</label> <div class="col-md-12"> <input type="text" placeholder="Enter blog Sub Heading" class="form-control form-control-line" name="sub_title" value="{{ $singleData->sub_title }}" required> </div> </div> <div class="form-group"> <label class="col-md-12">blog Content</label> <div class="col-md-12"> <input type="text" placeholder="Enter blog Content" class="form-control form-control-line" name="content" value="{{ $singleData->content }}" required> </div> </div> <div class="form-group"> <label class="col-md-12">Button Text</label> <div class="col-md-12"> <input type="text" placeholder="Enter Button Text" class="form-control form-control-line" name="button_text" value="{{ $singleData->button_text }}" required> </div> </div> <div class="form-group"> <label class="col-md-12">Button Link</label> <div class="col-md-12"> <input type="text" placeholder="Enter Button Link" class="form-control form-control-line" name="button_link" value="{{ $singleData->button_link }}" required> </div> </div> <div class="form-group"> <div class="col-md-12"> <select name="blog_category_id" class="form-control form-control-line" aria-label="Default select example" required> <option disabled selected>Select Category</option> @foreach(App\Http\Controllers\BlogController::getBlogCategories() as $blogCategory) @if($singleData->blog_category_id == $blogCategory->id) <option value="{{$blogCategory->id}}" selected>{{ $blogCategory->name }}</option> @else <option value="{{$blogCategory->id}}">{{ $blogCategory->name }}</option> @endif @endforeach </select> </div> </div> <div class="form-group"> <label class="col-md-12">blog Image</label> <div class="col-md-12"> <input type="file" class="form-control form-control-line" name="image[]" > </div> </div> <div class="form-group"> <div class="col-sm-12"> <button type="submit" class="btn btn-primary text-white">Update</button> </div> </div> </form> </div> </div> </div> </div> </div> <!-- Column --> </div> <!-- Row --> <!-- ============================================================== --> <!-- End PAge Content --> <!-- ============================================================== --> <!-- ============================================================== --> </div> <!-- ============================================================== --> <!-- End Container fluid --> <!-- ============================================================== --> </div> @if (session()->has('productCreationsuccess')) <script src='https://code.jquery.com/jquery-3.6.1.min.js'></script> <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script> <script> $(document).ready(function(){ swal("","Blog Created Successfully","success"); }); </script> @php session()->forget('productCreationsuccess'); @endphp @endif <!-- ============================================================== --> <!-- End Page wrapper --> @endsection