Search for ICAO not working properly (#496)
This commit is contained in:
@@ -12,7 +12,9 @@ use Illuminate\Http\Request;
|
||||
*/
|
||||
abstract class Controller extends \Illuminate\Routing\Controller
|
||||
{
|
||||
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
|
||||
use AuthorizesRequests;
|
||||
use DispatchesJobs;
|
||||
use ValidatesRequests;
|
||||
|
||||
/**
|
||||
* Write a error to the flash and redirect the user to a route
|
||||
|
||||
@@ -8,5 +8,7 @@ use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class BaseEvent
|
||||
{
|
||||
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||
use Dispatchable;
|
||||
use InteractsWithSockets;
|
||||
use SerializesModels;
|
||||
}
|
||||
|
||||
@@ -13,9 +13,6 @@ use Illuminate\Support\Facades\Auth;
|
||||
use Prettus\Repository\Criteria\RequestCriteria;
|
||||
use Prettus\Repository\Exceptions\RepositoryException;
|
||||
|
||||
/**
|
||||
* Class FlightController
|
||||
*/
|
||||
class FlightController extends Controller
|
||||
{
|
||||
private $flightRepo;
|
||||
|
||||
@@ -96,12 +96,20 @@ class FlightRepository extends Repository implements CacheableInterface
|
||||
$where['route_code'] = $request->route_code;
|
||||
}
|
||||
|
||||
if ($request->filled('dpt_airport_id')) {
|
||||
$where['dpt_airport_id'] = strtoupper($request->dpt_airport_id);
|
||||
}
|
||||
|
||||
if ($request->filled('dep_icao')) {
|
||||
$where['dpt_airport_id'] = $request->dep_icao;
|
||||
$where['dpt_airport_id'] = strtoupper($request->dep_icao);
|
||||
}
|
||||
|
||||
if ($request->filled('arr_airport_id')) {
|
||||
$where['arr_airport_id'] = strtoupper($request->arr_airport_id);
|
||||
}
|
||||
|
||||
if ($request->filled('arr_icao')) {
|
||||
$where['arr_airport_id'] = $request->arr_icao;
|
||||
$where['arr_airport_id'] = strtoupper($request->arr_icao);
|
||||
}
|
||||
|
||||
// Distance, greater than
|
||||
|
||||
Reference in New Issue
Block a user