コード例 #1
0
ファイル: UserController.php プロジェクト: rnaffer/Admin_B
 public function editar($id)
 {
     $header = 'Editar Cliente';
     $breadcrumb = 'Editar Cliente';
     $accion = 'Guardar';
     $estados = Estado::all();
     $cliente = User::where('codigo', $id)->where('tipo_id', 2)->first();
     $ciudadCliente = Ciudad::where('id', $cliente->ciudad_id)->first();
     $estadoCliente = Estado::where('id', $ciudadCliente->departamento_id)->first();
     $ciudades = Ciudad::where('departamento_id', $estadoCliente->id)->get();
     return view('users.edit', compact('header', 'breadcrumb', 'estados', 'estadoCliente', 'cliente', 'accion', 'ciudades'));
 }
コード例 #2
0
 public function editar($id)
 {
     $header = 'Editar Proveedor';
     $breadcrumb = 'Editar Proveedor';
     $accion = 'Guardar';
     $estados = Estado::all();
     $proveedor = User::where('codigo', $id)->where('tipo_id', 3)->first();
     $ciudadProveedor = Ciudad::where('id', $proveedor->ciudad_id)->first();
     $estadoProveedor = Estado::where('id', $ciudadProveedor->departamento_id)->first();
     $ciudades = Ciudad::where('departamento_id', $estadoProveedor->id)->get();
     return view('proveedores.edit', compact('header', 'breadcrumb', 'estados', 'estadoProveedor', 'proveedor', 'accion', 'ciudades'));
 }
コード例 #3
0
 public function getGestionarPendientes($id)
 {
     $orden = Orden::find($id);
     $estados = Estado::where('state', '>', $orden->estadodesc->state)->where('nombre', '<>', 'confirmado')->get();
     return view('chef.gestionar-pendientes')->with(compact(['orden', 'estados']));
 }
コード例 #4
0
 public function filterbycountry($id)
 {
     $estados = Estado::where('id_pais', '=', $id)->get();
     return Response()->json($estados);
 }
コード例 #5
0
ファイル: Evento.php プロジェクト: pspaulus/MyBici_server
 public static function cargarEstados()
 {
     $estados = \App\Estado::where('objeto', '=', 'evento')->get();
     return $estados != null ? $estados : null;
 }
コード例 #6
0
ファイル: Estado.php プロジェクト: pspaulus/MyBici_server
 public static function getEstadoUsuario()
 {
     $estados = \App\Estado::where('objeto', '=', 'usuario')->get();
     return $estados ?: null;
 }