Ejemplo n.º 1
0
 /**
  * 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);*/
 }
Ejemplo n.º 3
0
 public function getById($idCmd)
 {
     return Commande::findOrFail($idCmd);
 }
Ejemplo n.º 4
0
 public function getDetailByNum($numCmd)
 {
     $cmd = new Commande();
     $result = $cmd->getDetailByNum($numCmd);
     return Response()->json($result, 200);
 }