se1team2's avatar

How to display a table with pagination

Hey all,

So, I'm the Product Owner in a Software Engineering class at my Uni. For our 2 semester long project, we are using PHP and Laravel. In my group, 4 of us have had PHP experience in a Server Side course. However, we did not learn anything MVC related, so if my questions seem... odd, then I'll apologize upfront.

Here's my current question:

We are wanting to display a list of resources from our database on an admin terminal page. However, we know there will easily be over 200 resources. That get's extremely tedious to scroll through. I am a part time C# developer while I finish up school, and I recently learned about pagination. I don't know if that is a PHP term, but it's where there are only x amount of viewable table rows/page, and the user can search/change pages through it in order to find a specific thing, and can also sort by clicking on the title.

How would we do something like that using PHP and MVC? I could figure it out in just a huge script on a web page, but I know that's now how this is supposed to be.

I appreciate any and all help. Thank you!

-Ryan

0 likes
2 replies
se1team2's avatar

That was extremely helpful, thank you! A follow up question with it, though:

Since we've already got our project, how would we integrate it? I was looking through https://datatables.yajrabox.com/starter, and there is a link: http://datatables.app/ . I assumed this was how you would integrate it with a current project, but it's a dead link.

Edit: Got it figured out. Just input 'composer require yajra/laravel-datatables-oracle'.

1 like

Please or to participate in this conversation.