theHocineSaad / linatabara3

Linatabara3 is an open source Laravel 9 blood donation platform that connects blood seekers with blood donors in their region.
https://linatabara3.com
MIT License
78 stars 12 forks source link

Refactored Search to Filters #11

Closed IsmailBourbie closed 1 year ago

IsmailBourbie commented 1 year ago

Used Filters Instead of using Search in DonorController::index , So you can remove the search method and no need for DonorsRequest.

Examples :computer::pencil2:

Benefits :star::white_check_mark:

  1. Reduce database queries.
  2. Remove unnecessary and repeated code.
  3. Make the code maintainable.

Notes :grey_exclamation::grey_exclamation:

  1. FiltersFeature is TESTABLE in tests/Feature/FilterDonorsTest.php, make sure tests works fine when you edit something.

NeedHelp :hand::pray:

Please try to take a look to the views and remove unnecessary code.

theHocineSaad commented 1 year ago

Thank you @IsmailBourbie