Current File : /home/tradevaly/www/resources/views/user/pages/product/index.blade.php |
@extends('user.ayaan.master')
@push('title','holesale Suppliers, Manufacturers & China Traders and Exporters Premium Directory')
@push('style')
@endpush
@section('content')
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header card-header-info card-header-icon">
<h4 class="card-title">Products Table</h4>
</div>
<div class="card-body">
<div class="table-responsive">
<a class="btn btn-success text-end" href="{{url('user/products/add')}}">ADD NEW</a>
<table class="table">
<thead>
<tr>
<th class="text-center">#</th>
<th>Image</th>
<th>Name</th>
<th>Category</th>
<!--<th>Messages</th>-->
<th class="text-right">Actions</th>
</tr>
</thead>
<tbody>
@php
$i = 0;
@endphp
@foreach ($products as $product)
<tr>
<?php $i++; ?>
<td class="text-center">{{$i}}</td>
<td><img style="width:50px; border-radius:10%;" src="{{asset('storage/images/admin/product/'.$product['image'])}}" alt=""></td>
<td>{{$product->title}}</td>
<td>
{{$product->category->name}}
</td>
<!--<td>-->
<!--{{$product->message->count()}}-->
<!--</td>-->
@if($product->deleted_at)
<td class="td-actions text-right">
<a href="{{ route('user.addPrice',$product->id)}}" class="btn btn-danger" title="Add Price" style="color: #fff">
<i class="fa fa-tags"></i>
</a>
<a href="{{route('user.trashed_products.return',$product->id)}}" class="btn btn-success" title="Edit">
<i class="fas fa-undo-alt"></i>
</a>
<a href="{{ route('user.trashed_products.destroy',$product->id)}}" class="btn btn-danger confirmDelete" title="Delete" style="color: #fff">
<i class="fas fa-times"></i>
</a>
</td>
@else
<td class="td-actions text-end">
@if(!($product->price_type == "negotiable"))
<a href="{{ route('user.addPrice',$product->id)}}" class="btn btn-danger" title="Add Price" style="color: #fff">
<i class="fa fa-tags"></i>
</a>
@endif
<a href="{{url('user/product/edit',$product->id)}}" class="btn btn-success" title="Edit">
<i class="fas fa-pencil-alt"></i>
</a>
<a href="{{ route('user.delproducts',$product->id)}}" class="btn btn-danger" title="Delete" style="color: #fff">
<i class="fas fa-times"></i>
</a>
@if($product->status == 1)
<a href="{{route('user.featured.submit',$product->id)}}" class="btn btn-primary" title="Feature Product" style="color: #fff">
<i class="fas fa-ad"></i>
</a>
@endif
</td>
@endif
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
@stop
@push('script')
@endpush