public static function getTiposUsuario($usuario_tipo) { if ($usuario_tipo == 1) { //si es admin carga todos $tipos = \App\Tipo::where('objeto', '=', 'usuario')->whereNotIn('id', [1])->get(); } else { $tipos = \App\Tipo::where('objeto', '=', 'usuario')->whereNotIn('id', [1, 8])->get(); } return $tipos ?: null; }
public static function cargarTipos() { $tipos = \App\Tipo::where('objeto', '=', 'evento')->get(); return $tipos != null ? $tipos : null; }