CRM - tp 1,2, et 3 bientot fini refresh

This commit is contained in:
2026-09-16 12:08:49 +02:00
parent 5533735d5d
commit fc4c55546f
79 changed files with 274 additions and 11123 deletions
@@ -1,29 +1,45 @@
<?php
namespace App\Http\Controllers;
use App\Models\Client;
class ClientsController extends Controller
{
public function index()
{
$clients = [
[
'name' => 'Jean Dupont',
'email' => 'jean@example.com',
'city' => 'Paris'
],
[
'name' => 'Marie Martin',
'email' => 'marie@example.com',
'city' => 'Lyon'
],
[
'name' => 'Paul Durand',
'email' => 'paul@example.com',
'city' => 'Marseille'
]
];
{
// $clients = Client::all();
return view('clients', ['clients' => $clients]);
// return view('clients.index', [
// 'clients' => $clients
// ]);
// }
// $clients = Client::where('city', 'Paris')->get();
// $clients = Client::where('name', 'like', '%Martin%')->get();
$clients = Client::find(1);
return view('clients.index', [
'clients' => $clients
]);
}
// $clients = [
// [
// 'name' => 'Jean Dupont',
// 'email' => 'jean@example.com',
// 'city' => 'Paris'
// ],
// [
// 'name' => 'Marie Martin',
// 'email' => 'marie@example.com',
// 'city' => 'Lyon'
// ],
// [
// 'name' => 'Paul Durand',
// 'email' => 'paul@example.com',
// 'city' => 'Marseille'
// ]
// ];
// return view('clients', ['clients' => $clients]);
}
}