In this multi select radio button bootstrap tutorial, we will see multiple radio button in laravel. I will create a simple multiple radio button form for this tutorial and then I will show you how to get all the selected multiple radion buttons values in laravel controller. 

Normally we can not select multiple radio button values. At a time, only we can select one radio button value. So if you want to select multiple radio button values, then you should have to use the checkbox and make it a custom design like a radio button. 

I will use the checkbox and then I will make it a custom design like the radio button and then show you how to insert multiple radio button value in database using php laravel.

laravel-multiple-radio-button-selection-example

So let's see the source code form of multiple radio button in laravel form:

@extends('layouts.app')
@push('style')
    <style>
        :root {
            --form-control-color: #0970e6;
            --form-control-disabled: #959495;
            --current-color: #adadad;
            --font-size: 1.5em;
            --transition-time: 120ms;
            }

            *,
            *:before,
            *:after {
            box-sizing: border-box;
        }
        input[type="checkbox"] {
            -webkit-appearance: none;
            appearance: none;
            background-color: var(--form-background);
            margin: 0.1em 0 0;
            font: inherit;
            color: var(--current-color);
            width: 1em;
            height: 1em;
            border: 0.05em solid currentColor;
            border-radius: 50%;
            transform: translateY(-0.075em);
            transition: var(--transition-time) background ease-in-out;
            display: grid;
            place-content: center;
        }

        input[type="checkbox"]:checked {
            border-color: transparent;
            background-color: var(--form-control-color);
        }

        input[type="checkbox"]::before {
            content: "";
            width: 0.25em;
            height: 0.25em;
            transform: scale(0);
            transition: var(--transition-time) transform ease-in-out;
            box-shadow: inset 1em 1em white;
            border-radius: 50%;
        }
        input[type="checkbox"]:checked::before {
            transform: scale(1);
        }
    </style>
@endpush
@section('content')
<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-8">
            <div class="card">
                <div class="card-header">Laravel Multiple Radio Button Selection Example | Laravelia</div>
                 <div class="card-body">
                    <form class="w-px-500 p-3 p-md-3" action="{{ route('user.store') }}" method="post">
                        @csrf
                        <div class="row mb-3">
                            <label class="col-sm-3 col-form-label">Language</label>
                            <div class="col-sm-9 mt-2">
                                <input type="checkbox" name="language[]" value="php"> PHP
                                <input type="checkbox" name="language[]" value="c#"> C#
                                <input type="checkbox" name="language[]" value="java"> Java
                                <input type="checkbox" name="language[]" value="c++"> C++
                            </div>
                        </div>
                    
                        <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>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection

 

Now use your controller like:

App\Http\Controllers\TutorialController.php

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class TutorialController extends Controller
{
    public function index()
    {
        return view('welcome');
    }

    public function store(Request $request)
    {
        return $request;
    }
}

 

Now submit the form and see the output:

{
    "_token": "V0Amvlkx44FbtQmoWZduMWw12s7bV5O88rS4qRbY",
    "language": [
        "php",
        "c#",
        "java"
    ]
}

 

Read also: How To Get Selected Radio Button Value In Laravel Controller

 

Conclusion

Hope this radio button selecting multiple values tutorial will help. After completing this multiple radio button selection in html tutorial, your concept will be clear about multiple radio button selection. Hope this multiple radio button in laravel form tutorial will clear your concept about multi select radio button bootstrap.