json লেবেলটি সহ পোস্টগুলি দেখানো হচ্ছে৷ সকল পোস্ট দেখান
json লেবেলটি সহ পোস্টগুলি দেখানো হচ্ছে৷ সকল পোস্ট দেখান

Parsing json data and show in loop in a table Using Laravel

Parsing json data and show in loop in a table Using Laravel

First you would have to convert the JSON to an array with $array_data = json_decode($array, true), then you can pass the data to your view with return view('page', ["array_data"=>$array_data]);, next you would have to parse it in blade like:

<table>
<tr>
    <td>id</td>
    <td>User id</td>
    <td>Patient name</td>
    <td>Age</td>
    <td>Sex</td>
</tr>
@foreach($array_data as $key=>$value){
<tr>
    <td>{{$value["id"]}}</td>
    <td>{{$value["user_id"]}}</td>
    <td>{{$value["patient_name"]}}</td>
    <td>{{$value["age"]}}</td>
    <td>{{$value["sex"]}}</td>
</tr>
@endforeach
In the video, i'm showing all steps in project.

Read More

Store Form data to mysql as JSON in Laravel 6.0

Store Form data to mysql as JSON in Laravel 6.0

Sometime, In laravel projects we need to store data in database into json format. In this simple laravel 6 store json data example, we will store form data to json format in database step by step from scratch.
Just follow few steps and simply store your data to database into json format laravel based project.
Read More