Laravel array value get to show one by one
My database
My blade view
But I want to have this
My controller
$profiles= Profile::where('id', $id)->get();
return view('artists.profile_edit',compact('profiles'));
My blade template
@foreach ($profiles as $key => $profile)
<div class="col-md-6">
<input type="text" class="form-control mb-3 " name="social_media_channel_name[]" value="" placeholder="Social Media Channel Name">
</div>
<div class="col-md-6">
<input type="text" class="form-control mb-3 " name="social_media_channel_link[]" value="" placeholder="Social Media Channel Link">
</div>
@endforeach
Here I am trying to get array data and show in blade one by one.



Comments
Post a Comment