Bringing and Saving Previous Selections When Editing Page with 'Select' Field

Hello good afternoon, I needed help On one of my screens I have a Select field where your options are specific through a database query
Select::make('discipline') ->multiple() ->options(function (callable $get){ $disciplines = Curso::select('tb_disciplina.id_disciplina', 'tb_disciplina.descricao') ->join('tb_periodo', 'tb_curso.id_curso', 'tb_periodo.id_curso') ->join('tb_disciplina', 'tb_periodo.id_periodo', 'tb_disciplina.id_periodo') ->where('tb_curso.id_curso', $get('id_curso')) ->where('tb_curso.status', 'Ativo') ->orderBy('tb_periodo.nome'); return $disciplinas->pluck('tb_disciplina.descricao', 'tb_disciplina.id_disciplina'); })
When subjects are selected, it saves this information in another table in the bank. What do I need to know and when I edit the page, how do I bring what was previously selected and save it in the other table
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server