@if($withdraws != '[]') @foreach($withdraws as $withdraw) {{$withdraw->id}} @endforeach @endif @if($pays != '[]') @foreach($pays as $pay) {{$pay->id}} @endforeach @endif
$withdraws = Withdraws::where('user_id', Auth::user()->id)->orderBy('id', 'desc')->get(); $pays = Payments::where('user_id', Auth::user()->id)->orderBy('id', 'desc')->get(); return view('history', compact('settings', 'withdraws', 'pays'));
Код как вывожу на страницу
Контроллер как получаю:
Фото как отображается:
Как должно: