41 lines
1.8 KiB
PHP
41 lines
1.8 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('content')
|
|
<div class="container mt-4">
|
|
<div class="card">
|
|
<div class="card-header d-flex justify-content-between align-items-center">
|
|
<h4>Fuel List</h4>
|
|
<a href="{{ route('fuels.create') }}" class="btn btn-primary">Add Fuel</a>
|
|
</div>
|
|
<div class="card-body">
|
|
<table class="table table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th>Fuel Name</th>
|
|
<th>Date Created</th>
|
|
<th>Date Modified</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse ($fuels as $fuel)
|
|
<tr>
|
|
<td>{{ $fuel['name'] }}</td>
|
|
<td>{{ \Carbon\Carbon::parse($fuel['createdAt'])->format('M d, Y H:i') }}</td>
|
|
<td>{{ \Carbon\Carbon::parse($fuel['updatedAt'])->format('M d, Y H:i') }}</td>
|
|
<td>
|
|
<a href="{{ route('fuels.edit', $fuel['id']) }}" class="btn btn-sm btn-warning">Edit</a>
|
|
<button class="btn btn-sm btn-danger" wire:click="delete({{ $fuel['id'] }})" wire:loading.attr="disabled" wire:target="delete">Delete</button>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="4" class="text-center">No fuels found.</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection |