Ejemplo n.º 1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  Cliente $cliente
  * @return \Illuminate\Http\Response
  */
 public function edit(Cliente $cliente)
 {
     $action = 'ClientesController@update';
     $gerentes = Funcionario::getAllByCargo('gerente')->lists('nome', 'id');
     $vendedores = Funcionario::getAllByCargo('vendedor')->lists('nome', 'id');
     $cliente->pecaEsp = $cliente->especial['pecaEsp'];
     $cliente->valorEsp = $cliente->especial['valorEsp'];
     $cliente->excedente = $cliente->especial['excedente'];
     $precos = Preco::orderBy('nome', 'asc')->lists('nome', 'id');
     return view('comercial.clientes.form', compact('cliente', 'action', 'gerentes', 'vendedores', 'precos'));
 }
Ejemplo n.º 2
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $preco = Preco::orderBy('nome', 'asc')->get();
     return view('administracao.precos.index', ['precos' => $preco]);
 }