TP6 et avant
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<h2>Liste des clients</h2>
|
||||
<a href="{{ route('clients.create') }}">
|
||||
Ajouter un client
|
||||
</a> <form method="GET" action="{{ route('clients.index') }}">
|
||||
<input
|
||||
type="text"
|
||||
name="search"
|
||||
placeholder="Rechercher un client"
|
||||
value="{{ $search }}"
|
||||
>
|
||||
<button type="submit">
|
||||
Rechercher
|
||||
</button>
|
||||
</form>
|
||||
<p>Nombre de clients : {{$clients->count()}}</p>
|
||||
@foreach($clients as $client)
|
||||
<p>
|
||||
{{ $client->name }}
|
||||
-
|
||||
{{ $client->email }}
|
||||
-
|
||||
{{ $client->city }} <a href="{{ route('clients.show', $client) }}">
|
||||
Voir
|
||||
</a>
|
||||
| <a href="{{ route('clients.edit', $client) }}">Modifier</a>
|
||||
| <form method="POST"
|
||||
action="{{ route('clients.destroy', $client) }}">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit">
|
||||
Supprimer
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<p>Client créé le : {{$client->created_at}}</p>
|
||||
</p>
|
||||
@endforeach
|
||||
{{ $clients->links() }}
|
||||
@endsection
|
||||
Reference in New Issue
Block a user