Uname: Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
Software: LiteSpeed
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.213.251.212
Your Ip: 3.145.167.199
User: allssztx (535) | Group: allssztx (533)
Safe Mode: OFF
Disable Function:
NONE

name : view_services.blade.php
<x-admin.header />
<x-admin.sidebar />

                        <div class="main-content">
                        	<div class="graph-card card-table" id="ServiceList">
                                <div class="card-head">
                                    <div class="text-content">
                                        <h5>Services</h5>
                                    </div>
                                    <div class="card-drp">
                                        <div class="btn-content btn-group" role="group" aria-label="Basic example">
                                        @if(Auth::user()->type == 'admin')
                                        <a href="add_service" target="blank"><button type="button" class="btn active">Add New</button></a>
                                        @endif
                                    </div>
                                    </div>
                                </div>
                                <div class="card-body">
                                    <div class="table-responsive table-scroll">
                                        <table class="table-management">
                                            <thead>
                                                <tr>
                                                    <th>#</th>
                                                    <th>CMS Title</th>
                                                    <th>CMS Heading</th>
                                                    <th>Status</th>
                                                    <th>Actions</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                            	@foreach($services as $key => $service)
                                                <tr>
                                                    <td>{{$service->service_id}}</td>
                                                    <td>{{$service->service_title}}</td>
                                                    <td>{{$service->service_heading}}</td>
                                                    @if($service->service_status == 1)
                                                    <td>Active</td>
                                                    @else
                                                    <td>Un-Active</td>
                                                    @endif
                                                    <td>
                                                        <a href="{{'edit_service'.$service->service_id}}" ><button class="refresh-btn edit-btnn" data-tooltip="Edit">
                                                            <i class="fa-regular fa-pencil"></i>
                                                        </button></a>
                                                        <!-- <button class="delete-btn btn_del" value="{{$service->service_id}}" data-tooltip="Delete">
                                                            <i class="fa-regular fa-xmark"></i>
                                                        </button> -->
                                                        <button></button>
                                                    </td>
                                                </tr>
                                                @endforeach
                                            </tbody>
                                        </table>
                                    </div>
                                    <div class="pagination">
                                    
                                </div>
                                </div>
                            </div>
                        </div>

                        <!-- Delete Work Start Here -->

                        <script>
                            $(document).ready(function(){
                                $('body').on('click', '.btn_del', function(e){
                                    e.preventDefault();

                                    var id = $(this).val();

                                    $.ajax({
                                        url: "delete_service",
                                        method: "GET",
                                        data: {'id':id},
                                        cache: false,
                                        success:function()
                                        {
                                            toastr.success("Service Deleted Successfully","Deleted",{timeOut:1500});
                                            $("#ServiceList").load(location.href+" #ServiceList>*","");
                                        },
                                        error:function()
                                        {
                                            toastr.error("SomeThing Went Wrong","Error",{timeOut:1500});
                                            false;
                                        },
                                    });
                                });
                            });
                        </script>

                        <!-- Delete Work End Here -->

<x-admin.footer />
© 2025 GrazzMean-Shell