show all flights in admin/active by default

This commit is contained in:
Nabeel Shahzad
2017-12-26 14:14:04 -06:00
parent 70f1a6ee02
commit 81d349d78d
2 changed files with 11 additions and 5 deletions

View File

@@ -35,9 +35,11 @@ class FlightRepository extends BaseRepository implements CacheableInterface
*/
public function searchCriteria(Request $request, bool $only_active=true)
{
$where = [
'active' => $only_active,
];
$where = [];
if($only_active === true) {
$where['active'] = $only_active;
}
if ($request->filled('flight_id')) {
$where['id'] = $request->flight_id;