Table from different database connection

I have this Livewire Component which implementing the HasTable, this component should render a table with data from a query that is mainly using this Model that uses protected $connection = 'other_database', this query has multiple joins with tables that are from the same 'other_database'...the thing is that my table its being rendered, it it's paginating and counting the total number of data etc...the only value that it's being showed it's the id_matricula value, all others are not.

The query:
       $this->alunos = Matricula::select('tb_matricula.id_matricula', 'tb_aluno.ra', 'tb_perfil.nome', 'tb_periodo_letivo.descricao', 'tb_curso_base.nome_para_impressao', 'tb_disciplina.descricao', 'tb_matricula_disciplina.frequencia')
                    ->join('tb_aluno', 'tb_aluno.id_aluno', 'tb_matricula.id_aluno')
                    ->join('tb_matricula_disciplina', 'tb_matricula_disciplina.id_matricula', 'tb_matricula.id_matricula')
                    ->join('tb_disciplina_professor', 'tb_disciplina_professor.id_disciplina_professor', 'tb_matricula_disciplina.id_disciplina_professor')
                    ->join('tb_disciplina', 'tb_disciplina.id_disciplina', 'tb_disciplina_professor.id_disciplina')
                    ->join('tb_curso', 'tb_curso.id_curso', 'tb_matricula.id_curso')
                    ->join('tb_curso_base', 'tb_curso_base.id_curso_base', 'tb_curso.id_curso_base')
                    ->join('tb_turma', 'tb_turma.id_turma', 'tb_matricula.id_turma')
                    ->join('tb_perfil', 'tb_perfil.id_perfil', 'tb_aluno.id_perfil')
                    ->join('tb_periodo_letivo', 'tb_periodo_letivo.id_periodo_letivo', 'tb_matricula.id_periodo_letivo')
                    ->where('tb_matricula.id_periodo_letivo', '=', $this->periodo_letivo)
                    ->where('tb_curso_base.id_curso_base', '=', $this->curso)
                    ->where('tb_disciplina.id_disciplina', '=', $this->disciplina)
                    ->get();
Was this page helpful?