json(['Clients' => Clients::all(), 'status' => 'OK'], 200); } /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return Response */ public function store(Request $request) { // } /** * Display the specified resource. * * @param int $id * @return Response */ 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; } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return Response */ public function update(Request $request, $id) { // } /** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { // } }