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