Files
portal-api/resources/views/admin/addon/index.blade.php
T
2025-07-24 16:18:27 +07:00

60 lines
2.5 KiB
PHP

@extends("admin.main")
@section("content")
<div class="card card-primary card-outline">
<div class="card-header">
<a href="{{ route('addon.create') }}" class="btn btn-outline-secondary">
<i class="fas fa-plus"></i> Add New Addon
</a>
</div>
<div class="card-body">
<table class="table table-invoice table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Price</th>
<th>Type</th>
<th style="width:40px"></th>
<th style="width: 40px"></th>
</tr>
</thead>
<tbody>
@if(count($addOns) > 0)
@foreach($addOns->all() as $item)
<tr>
<td class="text-center">
{{ $item->name }}
</td>
<td class="text-center">
{{ number_format($item->price,0,',','.') }} vnđ
</td>
<td class="text-center">
{{ $item->Type->name }}
</td>
<td>
<a class="btn btn-warning btn-sm" href="{{ route('addon.edit',['id' => $item->id]) }}">
<i class="fas fa-user-edit"></i>
</a>
</td>
<td>
<form method="post" class="d-inline"
action="{{ route('addon.destroy',['id' => $item->id]) }}">
@csrf
@method('delete')
<button type="submit" data-toggle="tooltip" data-placement="top" title=""
class="btn btn-sm btn-danger" data-original-title="Xoá">
<i class="fas fa-trash"></i>
</button>
</form>
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
<div class="card-footer">
{{ $addOns->withQueryString()->links() }}
</div>
</div>
@endsection