/** * Display the specified resource. * * @param int $id * @return Response */ public function show($id) { $cmd = new Commande(); $commandes = $cmd->getAllByClient($id); $cli = new Client(); $client = $cli->getById($id); return view('client.show')->with('commandes', $commandes)->with('client', $client); }
/** * Display the specified resource. * * @param int $id * @return Response */ public function show($id) { $cmd = new Commande(); $detailCom = $cmd->find($id); /*$cmdClis = $cmd->getProduitCommande($id); $client = new Client; $detailCli = $client->getById($idCli); return View::make('commande.show') ->with('detailCom', $detailCom) ->with('cmdClis', $cmdClis) ->with('detailCli', $detailCli);*/ }
public function getById($idCmd) { return Commande::findOrFail($idCmd); }
public function getDetailByNum($numCmd) { $cmd = new Commande(); $result = $cmd->getDetailByNum($numCmd); return Response()->json($result, 200); }