I have the need to apply a loop in a controller, but I do not know if it is appropriate to do so
public function reportes(Request $request)
{
$reporuser=usuarios::pluck('usuario_ad', 'user_id')->unique();
foreach($reporuser as $reporusers)
endforeach
return view('usuario.reportes',compact('userstarea'));
}
Or there is another way to make a loop.