Set Selected on Select Form Control in Laravel

May 6, 2020

In your blade file, you have to set the select option when you are in edit mode.

You need to get output like this

	
	

To get the above output you can use the following code


  @foreach($status as $obj)
    status_id == old('status_id', $obj->id))
             selected="selected"
        @endif
    >{{$obj->name}}</option>
   @endforeach