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')); }
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')); }
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'])); }
public function filterbycountry($id) { $estados = Estado::where('id_pais', '=', $id)->get(); return Response()->json($estados); }
public static function cargarEstados() { $estados = \App\Estado::where('objeto', '=', 'evento')->get(); return $estados != null ? $estados : null; }
public static function getEstadoUsuario() { $estados = \App\Estado::where('objeto', '=', 'usuario')->get(); return $estados ?: null; }