I've some problem with passing array, please give me some advice so I can solve this matter.
Here is My Controller:
$keluhan_list=DB::table('keluhans')
->select(DB::raw('id,produk,username,masalah,id_departemen'))
->where('status','=','Proses')->get();
return view('layanankonsumen.lihattindaklanjut',compact('keluhan_list');
And this is part of my Blade view:
@if (Auth::check() && (Auth::user()->level == 'MR' || Auth::user()->level == 'PDD' || Auth::user()->id_departemen ==' @foreach ($keluhan_list as $keluhan) {{$keluhan->id_departemen}} @endforeach' ))
It's not error but it's not pass the auth. When I try to replace with Auth::user()->id_departemen == '10'
it's working.