whereNull('exame.deleted_at') ->where('exame.ativo', true) ->where('exame.tipo_id', Tipo::LABORATORIAL) ->select([ 'exame.id', 'exame.nome', ]) ->orderBy('exame.nome') ->get(); } public static function show($id) { $exame = self::getExameModel($id); return (object) [ 'id' => $exame->id, 'nome' => $exame->nome, ]; } private static function getExameModel($id) { $exame = Exame::find($id); if (is_null($exame)) { throw new ExameNotFoundException(); } return $exame; } }