Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- return Excel::create('Attributes_for_' . $fileName, function ($excel) use ($attributes, $fileName) {
- $excel->sheet($fileName, function ($sheet) use ($attributes) {
- $sheet->loadView('layouts.psp.category.export')->with('attributes', $attributes);
- });
- })->download('xlsx');
- // Blade
- <table>
- @foreach($attributes as $code =>$arrValue)
- <tr>
- <td>{{$code}}</td>
- @foreach($arrValue as $index => $val)
- @if($code ==='option')
- <td>
- @foreach($val as $opt =>$arrOpt)
- {{ $arrOpt['label'].', ' }}
- @endforeach
- </td>
- @else
- <td>{{$val}}</td>
- @endif
- @endforeach
- </tr>
- @endforeach
- </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement