todo controller find

This commit is contained in:
OMGiTzPomPom 2023-03-03 17:45:53 +01:00
parent 8bc9e962b7
commit 5b7403cbbc

View File

@ -13,7 +13,6 @@ class ClientsController extends Controller
{
return Clients::all();
//return response()->json(['Clients' => Clients::all(), 'status' => 'OK'], 200);
}
/**
@ -35,7 +34,16 @@ class ClientsController extends Controller
*/
public function show($id)
{
//
//return Clients::where('id', $id)->get();
$r = Clients::find($id);
foreach ($r->LignesCommandes as $c) {
foreach ($c->LignesCommandes as $lc) {
$lc->Produits;
}
}
return $r;
}
/**