관리-도구
편집 파일: b7cd6623a8f2bbe1432a4d3d2976f89d.php
<?php $__env->startSection('content'); ?> <!-- Include Full jQuery (not slim) --> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <!-- Bootstrap 4 CSS --> <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet"> <!-- Bootstrap 4 JS + Popper --> <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> <style> video { max-width: 220px; border-radius: 8px; } </style> <div class="main-panel"> <div class="content-wrapper"> <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>Testimonials</b></h3> <button class="btn btn-success" data-toggle="modal" data-target="#addTestimonials">Add New Testimonial +</button> </div> <hr> <div class="table-responsive"> <table class="table table-hover"> <thead> <tr> <th>#</th> <th>Name</th> <th>Designation</th> <th>Location</th> <th>Video</th> <th class="text-center">Action</th> </tr> </thead> <tbody> <?php $__currentLoopData = $testimonials; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $testimonial): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td><?php echo e($loop->iteration); ?></td> <td><?php echo e($testimonial->name); ?></td> <td><?php echo e($testimonial->designation); ?></td> <td><?php echo e($testimonial->location); ?></td> <td> <?php if($testimonial->video): ?> <video controls> <source src="<?php echo e(asset($testimonial->video)); ?>" type="video/mp4"> Your browser does not support the video tag. </video> <?php else: ?> <span class="text-muted">No video uploaded</span> <?php endif; ?> </td> <td class="text-center"> <button class="btn btn-primary my-2" data-toggle="modal" data-target="#updateTestimonials<?php echo e($testimonial->id); ?>"> <i class="fa fa-pen"></i> </button> <form method="post" action="<?php echo e(route('admin-testimonials.destroy', $testimonial->id)); ?>" style="display:inline-block;"> <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?> <button class="btn btn-danger my-2"><i class="fa fa-trash"></i></button> </form> </td> </tr> <!-- Update Modal --> <div class="modal fade" id="updateTestimonials<?php echo e($testimonial->id); ?>" tabindex="-1" role="dialog"> <div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">Update Testimonial</h5> <button type="button" class="close" data-dismiss="modal">×</button> </div> <div class="modal-body"> <form method="post" action="<?php echo e(route('admin-testimonials.update', $testimonial->id)); ?>" enctype="multipart/form-data"> <?php echo csrf_field(); ?> <?php echo method_field('PUT'); ?> <div class="form-group"> <label>Name</label> <input type="text" name="name" value="<?php echo e($testimonial->name); ?>" class="form-control" required> </div> <div class="form-group"> <label>Designation</label> <input type="text" name="designation" value="<?php echo e($testimonial->designation); ?>" class="form-control" required> </div> <div class="form-group"> <label>Location</label> <input type="text" name="location" value="<?php echo e($testimonial->location); ?>" class="form-control"> </div> <div class="form-group"> <label>Upload Video (optional)</label> <input type="file" name="video" class="form-control" accept="video/*"> <?php if($testimonial->video): ?> <video controls class="mt-2"> <source src="<?php echo e(asset($testimonial->video)); ?>" type="video/mp4"> Your browser does not support the video tag. </video> <?php endif; ?> </div> <div class="text-center"> <button type="submit" class="btn btn-primary">Update</button> </div> </form> </div> </div> </div> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> </table> </div> </div> </div> </div> </div> </div> <!-- Add Testimonial Modal --> <div class="modal fade" id="addTestimonials" tabindex="-1" role="dialog"> <div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">Add New Testimonial</h5> <button type="button" class="close" data-dismiss="modal">×</button> </div> <div class="modal-body"> <form method="post" action="<?php echo e(route('admin-testimonials.store')); ?>" enctype="multipart/form-data"> <?php echo csrf_field(); ?> <div class="form-group"> <label>Name</label> <input type="text" name="name" class="form-control" placeholder="Enter Full Name" required> </div> <div class="form-group"> <label>Designation</label> <input type="text" name="designation" class="form-control" placeholder="Enter Designation" required> </div> <div class="form-group"> <label>Location</label> <input type="text" name="location" class="form-control" placeholder="Enter Location"> </div> <div class="form-group"> <label>Upload Video(Max file size = 15MB)</label> <input type="file" name="video" class="form-control" accept="video/*"> </div> <div class="text-center"> <button type="submit" class="btn btn-primary w-50">Submit</button> </div> </form> </div> </div> </div> </div> </div> <?php $__env->stopSection(); ?> <?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Users\D E L L\Downloads\ashnapa\resources\views/admin/testimonials.blade.php ENDPATH**/ ?>