Closed IsmailBourbie closed 1 year ago
looks like the code you contributed in 42fe979 in not working properly, please have a second look at it and retest it.
looks like the code you contributed in 42fe979 in not working properly, please have a second look at it and retest it.
Can you please give me more details, and tell what's wrong exactly?
tell w
Your code in fine, It's just me getting wrong results because of the Test that was running in the main database, my bad. Just one more thing, you can ignore checking if $filters['blood_group'] (in app\Models\User.php - line 51) exists, it will always exist, because of the validation in DonorRequest (in app\Http\Controllers\DonorController.php - line 22).
Just one more thing, you can ignore checking if $filters['blood_group'] (in app\Models\User.php - line 51) exists, it will always exist, because of the validation in DonorRequest (in app\Http\Controllers\DonorController.php - line 22).
Yes you can ignore checking for now, but am planning to delete Search feature and replace it with Filters in DonorsController::index
, for exmaple:
// using DonorsController::index
linatabra3.com/donors // get all donors
linatabra3.com/donors?blood_group=1 // get all donors with donors_group = 1
linatabra3.com/donors?blood_group=1&wilaya=1 // get all donors with donors_group = 1 and wilaya = 1
// using DonorsController::index and DonorsController::search
linatabra3.com/donors // get all donors
linatabra3.com/donors/search?blood_group=1 // get all donors with donors_group = 1
linatabra3.com/donors/search?blood_group=1&wilaya=1 // get all donors with donors_group = 1 and wilaya = 1
h?bloo
Okay, good idea. Thanks for your contributions
Removing duplication in Search action. improving request time by reducing SQL queries.
before:
after: