Closed IsmailBourbie closed 1 year ago
Used Filters Instead of using Search in DonorController::index , So you can remove the search method and no need for DonorsRequest.
DonorController::index
DonorsRequest
/donors
/donors?blood_group=1
/donors?wilaya=1
/donors?daira=1
/donors?blood_group=1&wilaya=16&daira=20
tests/Feature/FilterDonorsTest.php
Please try to take a look to the views and remove unnecessary code.
Thank you @IsmailBourbie
Used Filters Instead of using Search in
DonorController::index
, So you can remove the search method and no need forDonorsRequest
.Examples :computer::pencil2:
/donors
=> return all donors./donors?blood_group=1
=> Return all donors where their blood_group is 1./donors?wilaya=1
=> Return all donors where they are from wilaya 1./donors?daira=1
=> Return all donors where they are from daira1./donors?blood_group=1&wilaya=16&daira=20
=> Return all donors where their blood_group is 1 AND they are from wilaya 16 AND daira 20.Benefits :star::white_check_mark:
Notes :grey_exclamation::grey_exclamation:
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.