I am trying to count the amount of data my Request brings but it returns the value 1, when in fact it contains 6 data.
public function Guardar(Request $request)
{
echo count($request);
}
I am trying to count the amount of data my Request brings but it returns the value 1, when in fact it contains 6 data.
public function Guardar(Request $request)
{
echo count($request);
}
There are several ways to do it, maybe the simplest one is with the all () method, which usually lists the sent attributes:
count($request->all());