Last active
August 22, 2019 10:28
-
-
Save dvlpp/878df86f0d9b0b32eda0eb74a3cbd935 to your computer and use it in GitHub Desktop.
PassengerSharpList
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getListData(EntityListQueryParams $params) | |
{ | |
$passengers = Passenger::with(["travel"]); | |
if($birthdateFilter = $params->filterFor("birthdate")) { | |
$passengers->whereBetween("birth_date", [ | |
$birthdateFilter['start'], | |
$birthdateFilter['end'], | |
]); | |
} | |
return $this->transform($passengers->paginate(30)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment