4
I have a table CategoriaCNH with the following fields CodCategoriaCNH and Descricao.
and I have this piece of code html:
<select name="categoriaCnh">
    <option value="" disabled selected>CNH</option>
        @foreach($categoriaCnh as $cat)
            <option value="{{$cat->CodCategoriaCNH}}">{{$cat->Descricao}}</option>
        @endforeach
</select>
In the attribute value of option I’m setting the CodCategoriaCNH that comes from my table CategoriaCNH.
The point is:
Taking into consideration safety..
It is advisable to put the CodCategoriaCNH thus directly in the attribute value? 
Or the ideal would be the attribute value have the value of the column Descricao, and in the back-end I get the CodCategoriaCNH ?
I don’t see much problem in exposing the id, especially if it’s something like A, AB, etc. What’s your specific concern?
– gmsantos
@gmsantos, my concern is, exposing the ID will be at some security risk? if it is possible to have security holes exposing the ID..
– MeuChapeu