0
Good morning friends. I have a question.. need that in a view I select an option that contains the name of the driver but need that in the controller I receive the ID of that driver and not the request with his name. Another option I thought is a field that visually shows the driver’s name but underneath is sending his ID. Below is my code:
    <div class="row">
        <div class="col-md-12">
            <div class="col-md-4">
                <div class="margin-bottom-10">
                    <label class="control-label">Motorista</label>                                    
                    <select class="bs-select form-control" name="nome_motorista" data-width="100px">
                    @foreach($motorista as $m)                      
                        <option value="motorista">{{$m->nome}}</option>
                    @endforeach                                                                        
                    </select>                    
                </div>
            </div>
Note that in the option the user will select a specific driver, but I need that in the controller I receive the ID of that driver. Can someone help me? If someone knows how to show an option only visually to the user and this option chosen send a data X to the bank, I thank you, also solve my question!!
Simple and effective, thanks Luciano, the judgment is already burning, not even thought about it. Hugs
– Emanuel Vitor