i have a table called visitors :
visitors : (id , user_id , ip , created_at , route , refer )
i store a row for each page visit in the middleware wrapping my links
i want to show these in my admin panel but s you imagine there are a lot of them , so i want to show first visit of each day for each user like if i have this in db
1 , 356 , 127.0.0.1 , 2017-08-30 22:41:49
1 , 356 , 127.0.0.1 , 2017-08-30 22:50:49
1 , 356 , 127.0.0.1 , 2017-08-30 22:53:49
1 , 356 , 127.0.0.1 , 2017-08-30 23:11:49
1 , 400 , 127.0.0.1 , 2017-08-30 23:50:49
the query result should be
1 , 356 , 127.0.0.1 , 2017-08-30 22:41:49
1 , 356 , 127.0.0.1 , 2017-08-30 23:11:49
1 , 400 , 127.0.0.1 , 2017-08-30 23:50:49
so what i want is something like
DISTINCT(DATE(created_at))
but this will effect all users .. i want it to effect each user
its very complicated im not sure how should i go about this