Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

aurelo's avatar

Data picker in laravel 5.6

Hi, I have two db tables (models): tasks and employees. The table employees contains: id, name... The table tasks contains: id, employy_id, duration, created_at, updated_at ...

I need to add statistics to include: emloyy name, sum duration. However, I need to filter by days.

Example:

Employy John add 10 tasks today. Total duration 6 hours (per day). Employy John add 15 tasks yesterday. Total duration 3 hours (per day).

I need to view the calendar (example date picker) where I select the date and I see the table: example John 26.6.2018 6 hours.

How can I do that? Thank you.

0 likes
1 reply
Snapey's avatar

well I guess you are going to create a row in the tasks table each time employee submits some hours

totalling for the week will be a groupBy and sum query

showing the hours for a particular day is just a question of pulling rows that are for the specified day

Please or to participate in this conversation.