I already imploded all my checkboxes into 1 value from spoken_language[] including 1 textfield value.
html
<div>
{{ Form::checkbox('spoken_language[]', "English", array('class' => 'form-check-input')) }}
<label>English</label>
</div>
<div>
{{ Form::checkbox('spoken_language[]', "Bahasa Melayu", array('class' => 'form-check-input')) }}
<label>Bahasa Melayu</label>
</div>
<div>
{{ Form::checkbox('spoken_language[]', null, array('class' => 'form-check-input')) }}
<label>Others</label>
{{ Form::text('spoken_language[]', null, array('class' => 'form-control')) }}
</div>
php
$request->merge(['spoken_language' => implode(',', (array) $request->get('spoken_language'))]);
The problem is how I can do the data binding into blade template view (checkbox and textfield) based on 1 value?
My collection
<?php
$user = DB::table('users')
->where("users.id", Auth::user()->id)
->first();
return View::make('user.profile')->with('user', $user);
Like this example, I got these value English,Bahasa Melayu,Urdu, then I need to assign for each checkbox and Urdu in textfield. But if English,Bahasa Melayu, just checkbox only. Same goes to Urdu, goes to textfield.