0

I need to create a widget to display the last records in a table within a category and reapeat that for every category matching certain criteria. The problem here is that I haven't found a way to do this without manually creating a widget for every category and manually inserting them in my dashboard. Any way to do this without having to create almost everything from scratch?

I was specting to be able to add a loop in the getWidgets function and dynamically add those with something like:

foreach ($categories as $category) {
    $widgets[] = LastCreatedByCategoryId::make($category->id);
}

I don't find a way either repeat the same widget in the dashboard or to pass params to it.

Branpg
  • 3
  • 2
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jul 29 '23 at 05:08

1 Answers1

-1

I am sure it will work 100% with your requirement

and this package will be helpful for what you are looking

https://github.com/rmitesh/card-stack

Mitesh Rathod
  • 879
  • 5
  • 18