I am sending from my controller name,app,tlf,cel,fechadeingreso
all this goes in my variable $clients
. In my view it shows well, now I want to calculate the time that has elapsed since the date that client was entered, for this I created the function:
public function actividad($query)
{
$diff = $query->diffForHumans(Carbon::now());
return $this->where('actividad','=',$diff);
}
in my model User
and I try to bring the answer from my view
<td>{{ $cliente->actividad->actividad }}</td>
but it shows me this error
Trying to get property of non-object (View:
how to bring that response to my sight?