Oxygarum
Limit display of entries in table
Hey,
I know there is probably something overly easy I am overlooking, but I can not figure it out...
I have made a widget displaying a table, but now want to only show the 5 most recent records. How can this be done? I first thought about limit(), but its not working.
Thanks 🙂
3 replies
Problem with creating query to show differences in values from variables and sort them
Hey Hey,
I have a database that is getting input through a DeliveryLog resource form and so forth. In that employees need to input their deliveries handled within a shift. For simplicity I just called them deliveriesatstartofshift and deliveriesatendofshift. That is all working perfectly.
Now I created a new Resource, Model and so forth in which I want to use a query to display the employees that made the most deliveries within the last seven days. For this I would want to take the difference between deliveriesatstartofshift and deliveriesatendofshift for all shifts the employees did in that time period. Employees can make multiple shifts of course within the last days so those differences would need to get added up.
I worked for a while on it already, but am always running into the error "Cannot use "::class" on value of type null".
This is what I made so far for the query:
Hopefully I explained it well enough 😄
5 replies