jeudi 20 février 2020

Reuse existing registration in the database,Laravel 5.8

Controller

public function selecionarTestemunha($id){

I find the marriage process by id

$entradaCasamento = EntradaCasamento::find($id);

I find witnesses who are registered, and search for user_id

$testemunha = Testemunha::where('user_id', Auth::user()->id);

return view('testemunha.selecionar')->with(['entrada'=>$entradaCasamento]); }

View

 <div class="testemunha">
                <div class="d-flex justify-content-center">
                    <div class="col-5 offset">
                        @foreach($entrada->testemunhas as $testemunha)
                            <h4 class="text-center"  ></h4>

                            <a href=""
                               class="btn btn-feito btn-lg btn-block text-white">Editar Dados</a>
                        @endforeach
                        <hr>
                    </div>
                </div>
                <a href=""
                   class= "btn btn-info btn-lg btn-block text-white" id="testemunha">Adicionar Testemunha</a>


                <a href=""
                   class= "btn btn-info btn-lg btn-block text-white" >Selecionar Testemunha</a>


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/37K3OMK
via IFTTT

Aucun commentaire:

Enregistrer un commentaire