laravel split query code example
Example 1: explode in laravel blade
@if ($data->facings != "")
@foreach(explode(',', $data->facings) as $info)
<option>{{$info}}</option>
@endforeach
@endif
//@sujay
Example 2: laravel get query result as array
$result = array_map(function ($value) {
return (array)$value;
}, $result);