I have a dynamically generated form that gives me an array of inputs. However the array might be empty, then the foreach will fail.
public function myfunction(Request $request)
{
if(isset($request))
{
#do something
}
}
This obviously doesn't work since it is a $request object and is always set. I have no idea however how to check if there is any input at all.
Any ideas?