ldc-supportweb/resources/views/project/index.blade.php
2021-04-18 10:43:36 +02:00

32 lines
1.2 KiB
PHP

@extends('layout.app')
@section('project', 'active')
@section('content')
<div class="container content">
@include('modules.error-messages')
<h2>Gestion des projets<a href="{{ route('project.create') }}" class="float-right btn btn-sm btn-primary">Créer un projet</a></h2>
<table class="table table-hover">
<thead>
<th scope="col" class="w-75">Projet</th>
<th></th>
<th></th>
</thead>
<tbody>
@foreach ($projects as $project)
<tr>
<td>{{ $project->name }}</td>
<td><a href="{{ route('project.edit', $project->id) }}" class="btn btn-sm btn-primary">Modifier</a></td>
<td>
<form action="{{ route('project.destroy', $project->id) }}" method="POST" class="d-inline">
@method('DELETE')
@csrf
<input type="submit" class="btn btn-sm btn-danger" value="Supprimer" onclick="return confirm('Êtes-vous sûr(e) ?')">
</form>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@endsection