For creating 2 dimensional json array, follow below example code:
$fetch = DB::table('table_name')->get();
{{json_encode($fetch)}}
Hope, this work for you.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community