How to return the page in LARAVEL 5.4

0

I have a problem, I have 4 table, Courses, subjects, teachers and templates, each with a page for you, when I change or delete something in disciplines, teachers I return to page courses, I want to return to the page itself. I'm using laravel 5.4

 <!-- Cursos -->
            <div id="Cursos" class="tab-info" style="display:block;">
                @if(session('message'))
                    <p class='box-alert-info'>{{ session('message') }}</p>
                @endif
                @if(session('error'))
                    <p class='box-alert-error'>{{ session('error') }}</p>
                @endif
                <p><a href='#' class='modal-btn button special icon fa-plus' name='novoCurso'>Novo curso</a></p>
                <div class="table-wrapper">
                    <table>
                        <thead>
                            <tr>
                                <th>Curso</th>
                                <th>Editar</th>
                                <th>Excluir</th>
                            </tr>
                        </thead>
                        <tbody>
                            @foreach ($cursos as $curso)
                                <tr>
                                    <td>{{ $curso->nome }}</td>
                                    <td><a href="/administrador/cursos/editar/{{ $curso->id }}">Editar</a></td>
                                    <td><a href="/administrador/cursos/deletar/{{ $curso->id }}">Excluir</a></td>
                                </tr>
                            @endforeach
                        </tbody>
                    </table>
                </div>
            </div>
            <!-- Disciplinas -->
            <div id="Disciplinas" class="tab-info">
                @if(session('message'))
                    <p class='box-alert-info'>{{ session('message') }}</p>
                @endif
                @if(session('error'))
                    <p class='box-alert-error'>{{ session('error') }}</p>
                @endif
                <p><a href='#' class='modal-btn button special icon fa-plus' name='novaDisciplina'>Nova disciplina</a></p>
                <div class="table-wrapper">
                    <table>
                        <thead>
                            <tr>
                                <th>Disciplina</th>
                                <th>Editar</th>
                                <th>Excluir</th>
                            </tr>
                        </thead>
                        <tbody>
                            @foreach ($disciplinas as $disciplina)
                                <tr>
                                    <td>{{ $disciplina->nome }}</td>
                                    <td><a href="/administrador/disciplinas/editar/{{ $disciplina->id }}">Editar</a></td>
                                    <td><a href="/administrador/disciplinas/deletar/{{ $disciplina->id }}">Excluir</a></td>
                                </tr>
                            @endforeach
                        </tbody>

                        {
                            return '\administrador/configuracoes'
                        }

                    </table>
                </div>
            </div>
    
asked by anonymous 03.04.2018 / 15:02

2 answers

1

After the delete log procedure you can use helper

back() defined in Laravel.

See the documentation for the here function.

return back();

That will return to the same source page.

    
03.04.2018 / 15:17
0
return redirect(/pagina que você quer)
    
14.06.2018 / 17:59