51 lines
1.6 KiB
PHP
Executable File
51 lines
1.6 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>Regions</h2>
|
|
</div>
|
|
<div class="pull-right mb-2">
|
|
<a class="btn btn-success" href="{{ route('regions.create') }}"> Create Region</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>Region id</th>
|
|
<th>Country id</th>
|
|
<th>Region created</th>
|
|
<th>Region updated</th>
|
|
<th width="280px">Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($regions as $region)
|
|
<tr>
|
|
<td>{{ $region->id }}</td>
|
|
<td>{{ $region->country_id }}</td>
|
|
<td>{{ $region->created_at }}</td>
|
|
<td>{{ $region->updated_at }}</td>
|
|
<td>
|
|
<form action="{{ route('regions.destroy',$region->id) }}" method="Post">
|
|
<a class="btn btn-primary" href="{{ route('regions.edit',$region->id) }}">Edit</a>
|
|
@csrf
|
|
@method('DELETE')
|
|
<button type="submit" class="btn btn-danger">Delete</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
@endsection
|