I have a current_day_users table and users table.What is the better coding practice between the following to extract data from current_day_users:
1.UsersTable.php code
$this->CurrentDayUsers->find()->where(['user_id'=>$userId,'created'=>$dateToday])->first();
UsersTable.php code
$this->CurrentDayUsers->findUser($userId,$dateToday);
CurrentDayusersTable.php code
public function findUser($userId,$date){
return $this->find()->where(['user_id'=>$userId,'created'=>$date])->first();
}