A table with minimum rows.

Hello, I have a question. Is it possible to have a table where it show 5 rows even if there is not enough to fill it? example: I want to have a table where, if there is only 1 row from the sql, it will render even empty rows until it has 5 rows. Is this posible?
4 Replies
toeknee
toeknee2w ago
Simple answer... no. But you could use sushi if you just want to render date, where you get the data and if count is < 5 then add dummy rows
Felix
FelixOP2w ago
shame, but my experience with sushi is that it is primarily used for api's, does it still work with scopes, eloquent relations and whereHas functions?
toeknee
toeknee2w ago
Sushi is use for anything, if you want to then add a query within it instead of getting an API then yes.
Felix
FelixOP2w ago
thanks, will try.

Did you find this page helpful?