Support the ongoing development of Laravel.io →
Views Blade Forms
Last updated 2 years ago.
0

May be this will help:

            {!! Form::label('marca_id', 'Marca do Carro:') !!}
            {!! Form::select('marca_id', $nome, $carro->marca_id, ['class'=>'form-control']) !!}

The thrid parameter of Form::select() is for the current value.

0
<option value="{{ $marca->id }}" @if($carro->marca_id==$marca->id) selected="selected" @endif>{{ $marca->marca }}</option>
Last updated 8 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.