示例#1
0
 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;
 }
示例#2
0
 public static function cargarTipos()
 {
     $tipos = \App\Tipo::where('objeto', '=', 'evento')->get();
     return $tipos != null ? $tipos : null;
 }