In this tutorial, we will learn how to create a multi select dropdown select box in laravel blade and then how to show the option selected. So you will learn laravel select option selected from database. I will use select2 for this dropdown so that we can select multiple options. In this how to display selected multiple dropdown values in edit page laravel tutorial, we will fecth data from server and we will make it selected.

For that, I will create two arrays, one is for listing and another is for showing selected. So let's see the example code of old value in multiple select option in laravel blade:


So let's see the source code of option value selected in laravel blade:


<link href="" rel="stylesheet" />
        width: 100% !important;

<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-8">
            <div class="card">
                <div class="card-header" style="background: gray; color:#f1f7fa; font-weight:bold;">
                    Laravel 9 Select2 Multi Select Dropdown With Selected Example  -  Laravelia
                 <div class="card-body">
                        $languages = [

                        $selected = [
                    <form class="w-px-500 p-3 p-md-3" action="{{ route('') }}" method="post" enctype="multipart/form-data">
                        <div class="row mb-3">
                            <label class="col-sm-3 col-form-label">Framework</label>
                            <div class="col-sm-9 mt-3">
                                <select class="js-example-basic-single" multiple name="Framework[]">
                                    @foreach ($languages as $item)
                                        <option value="{{ $item }}"
                                            {{ in_array($item,$selected) ? 'selected' : '' }}>
                                            {{ $item }}
                        <div class="row mb-3">
                            <label class="col-sm-3 col-form-label"></label>
                            <div class="col-sm-9">
                                <button type="submit" class="btn btn-success btn-block text-white">Submit</button>

<script src=""></script>
<script src=""></script>
        theme: "classic",
        placeholder: 'Search Language',


Read also: Select2 Array - Dropdown Search In Laravel Application



Hope this old value in multiple select option in laravel blade tutorial will help. After completing this option value selected in laravel blade tutorial, your concept will be clear about laravel 9 select option selected from database. Hope this laravel select option selected from database tutorial will clear your concept about laravel select box selected.