49 lines
1.5 KiB
PHP
Executable File
49 lines
1.5 KiB
PHP
Executable File
@extends('layout.master')
|
|
|
|
@section('content')
|
|
<div class="container mt-2">
|
|
<div class="row">
|
|
<div class="col-lg-12 margin-tb">
|
|
<div class="pull-left">
|
|
<h2>Countries</h2>
|
|
</div>
|
|
<div class="pull-right mb-2">
|
|
<a class="btn btn-success" href="{{ route('countries.create') }}"> Create Country</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@if ($message = Session::get('success'))
|
|
<div class="alert alert-success">
|
|
<p>{{ $message }}</p>
|
|
</div>
|
|
@endif
|
|
<table class="table table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th>Country id</th>
|
|
<th>Country created</th>
|
|
<th>Country updated</th>
|
|
<th width="280px">Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($countries as $country)
|
|
<tr>
|
|
<td>{{ $country->id }}</td>
|
|
<td>{{ $country->created_at }}</td>
|
|
<td>{{ $country->updated_at }}</td>
|
|
<td>
|
|
<form action="{{ route('countries.destroy',$country->id) }}" method="Post">
|
|
<a class="btn btn-primary" href="{{ route('countries.edit',$country->id) }}">Edit</a>
|
|
@csrf
|
|
@method('DELETE')
|
|
<button type="submit" class="btn btn-danger">Delete</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
@endsection
|