/
home
/
sjslayjy
/
public_html
/
theweavenest
/
resources
/
views
/
Admin
/
Upload File
HOME
@extends('admin/layout') @section('page_title','Category') @section('category_select','active') @section('container') {{ session('message') }} <style> .table-striped tbody tr:nth-of-type(odd) { background-color: rgba(0, 0, 0, 0.05); } .btn-icon { padding: 5px 8px; font-size: 14px; } .btn-icon i { margin-right: 0; } .small-btn { font-size: 10px; padding: 5px 8px; line-height: 1.2; white-space: nowrap; height: auto; width: auto; } </style> <div class="container"> <div class="row"> <div class="col-12 text-center"> <h1 class="mt-3">Category Management</h1> </div> <div class="col-12 text-center mt-3"> <a href="category/manage_category" class="btn btn-success">Add Category</a> </div> </div> </div> <div class="main-content mt-4"> <div class="section__content section__content--p30"> <div class="container-fluid"> <div class="row"> <div class="col-lg-12"> <div class="table-responsive table--no-card m-b-30"> <table id="category_table" class="table table-borderless table-striped table-earning"> <thead> <tr> <th>ID</th> <th>Category Name</th> <th>Category Image</th> <th>Action</th> </tr> </thead> <tbody> @foreach($data as $list) <tr> <td>{{ $list->id }}</td> <td>{{ $list->CategoryName }}</td> <td> @if($list->CategoryImage) <img src="{{ asset('storage/media/category/' . $list->CategoryImage) }}" alt="Category Image" style="max-width: 100px; max-height: 100px;"> @else No Image Available @endif </td> <td> <a href="{{ url('admin/category/manage_category/' . $list->id) }}" class="btn btn-success btn-icon small-btn"> <i class="fa fa-pencil"></i> </a> @if($list->status == 1) <a href="{{ url('admin/category/status/0/' . $list->id) }}" class="btn btn-primary btn-icon small-btn"> <i class="fa fa-check"></i> </a> @elseif($list->status == 0) <a href="{{ url('admin/category/status/1/' . $list->id) }}" class="btn btn-warning btn-icon small-btn"> <i class="fa fa-times"></i> </a> @endif <a href="{{ url('admin/category/delete/' . $list->id) }}" class="btn btn-danger btn-icon small-btn"> <i class="fa fa-trash"></i> </a> </td> </tr> @endforeach </tbody> </table> </div> </div> </div> </div> </div> </div> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.24/js/jquery.dataTables.js"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> <link rel="stylesheet" href=""> <script> $(document).ready(function() { $('#category_table').DataTable(); }); </script> @endsection