File Manager Lite
Dir:
/home/codewavebd/public_html/resources/views/admin/products
Upload
[..]
index.blade.php (2.9 KB)
Edit
Rename
Del
Edit: index.blade.php
@extends('layouts.admin') @section('title', 'Software Showcase') @section('page_title', 'Software Products Showcase') @section('content') <div class="admin-card mb-5"> <div class="d-flex justify-content-between align-items-center mb-4 border-bottom border-secondary pb-3"> <h5 class="mb-0 font-heading text-white"><i class="bi bi-laptop-fill text-info me-2"></i>Active Software Showcase Items</h5> <a href="{{ route('admin.products.create') }}" class="btn btn-primary-glow"><i class="bi bi-plus-lg me-2"></i>Add Product</a> </div> <div class="table-responsive"> <table class="table table-dark table-hover mb-0"> <thead> <tr class="small text-muted"> <th>Name</th> <th>Category</th> <th>Base Price</th> <th>Total Plans</th> <th>Status</th> <th>Actions</th> </tr> </thead> <tbody> @forelse($products as $product) <tr class="small border-secondary"> <td class="text-white fw-bold">{{ $product->name }}</td> <td><span class="badge bg-secondary">{{ $product->category->name ?? 'None' }}</span></td> <td class="text-info fw-bold">৳{{ number_format($product->price) }}</td> <td><span class="badge bg-dark border border-secondary text-white">{{ $product->pricing_plans ? count($product->pricing_plans) : 0 }}</span></td> <td> <span class="badge {{ $product->status === 'active' ? 'bg-success' : 'bg-danger' }}"> {{ $product->status }} </span> </td> <td> <a href="{{ route('admin.products.edit', $product->id) }}" class="btn btn-sm btn-outline-info rounded-pill px-3 py-1 me-1">Edit</a> <form action="{{ route('admin.products.destroy', $product->id) }}" method="POST" class="d-inline" onsubmit="return confirm('Are you sure you want to delete this software product?')"> @csrf @method('DELETE') <button type="submit" class="btn btn-sm btn-outline-danger rounded-pill px-3 py-1">Delete</button> </form> </td> </tr> @empty <tr> <td colspan="6" class="text-center text-muted py-5">No software products found in showcase.</td> </tr> @endforelse </tbody> </table> </div> <div class="mt-4 d-flex justify-content-center"> {{ $products->links() }} </div> </div> @endsection
Simpan