Laravel array value get to show one by one

My database

Database

My blade view

Blade view

But I want to have this

Desired solution

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

Popular posts from this blog

Spring Elasticsearch Operations

Network Error and Timeout on Authorize.net JS

Object oriented programming concepts (OOPs)