관리-도구
편집 파일: seo.blade.php
@extends('layouts.app') @section('content') <!-- partial --> <div class="main-panel"> <div class="content-wrapper"> <style> .description-cell { max-width: 200px; /* Adjust the value as needed */ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } </style> <div class="row"> <div class="col-lg-12 grid-margin stretch-card"> <div class="card"> <div class="card-body"> <div class="d-flex justify-content-between"> <h3 class="text-center"><b>Seo Description</b></h3> <button class="btn btn-success" data-toggle="modal" data-target="#addService">Add new Seo +</button> </div> <hr> <div class="table-responsive"> <table class="table table-hover"> <thead> <tr> <th>#</th> <th>Page</th> <th>Title</th> <th>Description</th> <th class="text-center">Action</th> </tr> </thead> <tbody> @if($seos) @foreach ($seos as $seo) <tr> <td>{{$loop->iteration}}</td> <td>{{$seo->page}}</td> <td>{{$seo->title}}</td> <td style="white-space: normal; word-wrap: break-word;">{{$seo->description}}</td> <td class="text-center"> <button class="btn btn-primary my-2" data-toggle="modal" data-target="#updateService{{$seo->id}}"><i class="fa fa-pen"></i></button> <form method="post" action="{{route('admin-seo.destroy', $seo->id)}}"> @csrf @method('DELETE') <button class="btn btn-danger my-2"><i class="fa fa-trash"></i></button> </form> </td> </tr> <!--update Service Modal --> <div class="modal fade" id="updateService{{$seo->id}}" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLongTitle">Update Seo</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <div class="card"> <div class="card-body"> <form method="post" action="{{route('admin-seo.update', $seo->id)}}" enctype="multipart/form-data"> @csrf @method('PUT') <div class="form-group"> <label for="exampleInputUsername1">Page</label> <input type="text" name="page" value="{{$seo->page}}" class="form-control" id="exampleInputUsername1" placeholder="Enter Title"> </div> <div class="form-group"> <label for="exampleInputUsername1">Title</label> <input type="text" name="title" value="{{$seo->title}}" class="form-control" id="exampleInputUsername1" placeholder="Enter Title"> </div> <div class="form-group"> <label for="exampleInputDescription">Description</label> <textarea class="form-control" name="description" id="exampleInputDescription" rows="4" placeholder="Enter description">{{$seo->description}}</textarea> </div> <div class="text-center"><button type="submit" class="btn btn-primary w-50">Submit</button></div> </form> </div> </div> </div> </div> </div> </div> @endforeach @endif </tbody> </table> </div> </div> </div> </div> </div> </div> <!-- content-wrapper ends --> <!--Add Service Modal --> <div class="modal fade" id="addService" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLongTitle">Add new Seo</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <div class="card"> <div class="card-body"> <form method="post" action="{{route('admin-seo.store')}}" enctype="multipart/form-data"> @csrf <div class="form-group"> <label for="exampleInputUsername1">Page</label> <input type="text" name="page" class="form-control" id="exampleInputUsername1" placeholder="Enter Page"> </div> <div class="form-group"> <label for="exampleInputUsername1">Title</label> <input type="text" name="title" class="form-control" id="exampleInputUsername1" placeholder="Enter Title"> </div> <div class="form-group"> <label for="exampleInputDescription">Description</label> <textarea class="form-control" name="description" id="exampleInputDescription" rows="4" placeholder="Enter description"></textarea> </div> <div class="text-center"><button type="submit" class="btn btn-primary w-50">Submit</button></div> </form> </div> </div> </div> </div> </div> </div> @endsection