At the moment I try to set a list in a time period.
public function UsersWork()
{
return $this->hasMany('App\Models\UsersWork', 'user_id')->whereBetween('end', ["DATE_SUB(CURDATE() INTERVAL 5 YEAR)", date('Y-m-d')]);
}
It will output the whole list and not as I want the last 5 years.
What's went wrong?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1o9Bkp2
via IFTTT
Aucun commentaire:
Enregistrer un commentaire