I think that there is no community agreement on this topic. I would say cover your code with tests and do not overcomplicate it. Not sure if anyone has done this correctly that you can implement and not experience any issues.
May 24, 2020
1
Level 3
Should I use Pipelines for Searching, Filtering, Sorting and Paginate
Goal:
I'm creating an inventory system in Laravel 7. I want to create a way to search, filter, limit, and paginate the products in my index.blade.php view. Very similar to what e-commerce pages have... Where you can filter by categories, active or inactive products, and search by the product's name or product id.
I already have the pagination by using Laravel's paginate function, but I still need to get the dynamic limit...
Problem:
I know there are several ways to accomplish this... Like creating pipelines, create methods in a Repository file and etc... Is there a Laravel way of doing this?
Please or to participate in this conversation.