Airport Guide Documentation

PageController extends BaseController
in package

Table of Contents

Methods

airlinesDetails()  : string|Response
This function is used to display detailed information and route map for a specific airline.
airlinesInfo()  : string|Response
This function is used to fetch and display airline information for a specific airport.
airportCity()  : string|Response
This function is used to display detailed information for a specific airport-city combination.
airportCode()  : Response
This function is used to redirect airportcode to icao_identifier.
airportCodeAny()  : Response
Handle airport code routing with additional parameters.
airportInfo()  : string|Response
This function is used to display detailed information for a specific airport.
airportInfoByLocId()  : stdClass
This function is used to retrieve detailed airport information by airport code.
airportMapDetail()  : string|Response
This function is used to display the detailed map and related information for a specific airport.
allAirlinesDetails()  : Response
Display comprehensive airline information and details page.
allAirports()  : string
This function is used to display a comprehensive list of all airports with caching support.
cityDataInfo()  : mixed
This function is used to city information.
countryInfo()  : string|Response
This function is used to display an overview of all U.S. states and their airports.
destinationInfo()  : string|Response
This function is used to display a comprehensive list of all airlines and their details.
formateHeadingFromSlug()  : string
This function is used to format a slug string into a human-readable heading.
getBreadCrumbs()  : string
This function is used to generate the HTML for page breadcrumbs navigation.
getCity()  : Response|bool
This function is used to fetch and display additional city-related data for a specific airport.
getDownloadPdfAirportMap()  : StreamedResponse|Response
This function is used to generate and stream a PDF of the airport map for a specific airport.
getDownloadPdfData()  : StreamedResponse|Response
This function is used to generate and stream a PDF of a specific airport terminal map.
getMoreCharterBus()  : Response|bool
This function is used to fetch and display additional paginated charter bus data for a specific airport.
getMoreCities()  : Response|bool
This function is used to fetch and display additional paginated city data for a specific airport.
getMoreLimo()  : Response|bool
This function is used to fetch and display additional paginated limo data for a specific airport.
getMoreLimoTaxi()  : Response|bool
This function is used to fetch and display additional paginated limo/taxi data for a specific airport.
getMoreScheduledBus()  : Response|bool
This function is used to fetch and display additional paginated scheduled bus data for a specific airport.
getMoreShuttle()  : Response|bool
This function is used to fetch and display additional paginated shuttle data for a specific airport.
getMoreTransport()  : Response|bool
This function is used to fetch and display additional paginated transit data for a specific airport.
gettop100ShuttlesCity()  : Response
This function is used to retrieve and display the top 100 shuttle services for cities associated with a specific airport.
pageNotFound()  : void
This function is used to display the custom 404 "Page Not Found" error page with site navigation and content context.
pageShow()  : Response|string
This functio Display dynamic or static inner pages based on the requested URL segments.
passwordProtected()  : JsonResponse
This function is used to validate password protection for a specific page and set a cookie if successful.
redirectLink()  : JsonResponse
Retrieve and return the external TripAdvisor link for a specific hotel at an airport.
redirectLinkCity()  : JsonResponse
Retrieve and return the external company link for a specific city shuttle service.
redirectLinkOfficial()  : JsonResponse
This function is used to retrieve and return the official external link for a specific airport service (transit, limo-taxi, shuttle, or Viator).
redirectLinkViator()  : JsonResponse
Retrieve and return the external Viator product link for a specific airport activity.
renderingDiagram()  : string|false
This function is used to generate an embedded iframe diagram for a specific airport location.
renderingMap()  : string|false
This function is used to generate an embedded iframe map for a specific airport location.
searchList()  : JsonResponse
This function is used to search for airports by name, city, airport code, or ICAO ID.
searchListContact()  : JsonResponse
This function is used to search for airports by name, city, airport code, or ICAO ID for contact-related queries.
searchListContacttwo()  : Model|bool
This function is used to search for a single airport by name, city, airport code, or ICAO ID for contact-related queries (with special input handling).
searchListtwo()  : Model|bool
This function is used to search for a single airport by name, city, airport code, or ICAO ID (with special handling for input format).
searchTerm()  : string
This function is used to search for airports based on a search term extracted from the URL segment.
shuttleSearchList()  : JsonResponse
This function is used to search for shuttle destination cities for a specific airport.
shuttleSearchListTwo()  : JsonResponse
This function is used to search for a specific shuttle destination city for a given airport.
stateInfo()  : string|Response
This function is used to display detailed information for a specific U.S. state and its airports.
teminalImage()  : string|Response
This function is used to display a specific terminal level image and its details for an airport terminal.
terminalInfo()  : string|Response
This function is used to fetch and display detailed terminal information for a specific airport and terminal.

Methods

airlinesDetails()

This function is used to display detailed information and route map for a specific airline.

public airlinesDetails(Request $request, MetaService $metaService) : string|Response

This method retrieves and compiles all relevant data for a given airline, including its routes, associated airports, and meta information for SEO. It renders the airline detail page in the frontend, and handles caching for performance. If the airline or required data is not found, a 404 error page is shown.

Parameters
$request : Request

The HTTP request instance.

$metaService : MetaService

Service for generating meta tags/content.

Return values
string|Response

Rendered HTML for the airline detail page, or a 404 response.

airlinesInfo()

This function is used to fetch and display airline information for a specific airport.

public airlinesInfo(Request $request, string $icao_identifier, string $slug, MetaService $metaService) : string|Response

This method retrieves all airlines operating at a given airport (identified by ICAO ID or airport code/LOCID), organizes them by country, prepares meta information for SEO, and renders the airline information page in the frontend. It also handles caching for performance. If the airport or required data is not found, a 404 error page is shown.

Parameters
$request : Request

The HTTP request instance.

$icao_identifier : string

The airport identifier: ICAO ID (e.g., 'KSFO') or airport code (LOCID, e.g., 'SFO').

$slug : string

The slug or additional identifier for the airline page.

$metaService : MetaService

Service for generating meta tags/content.

Return values
string|Response

Rendered HTML for the airline information page, or a 404 response.

airportCity()

This function is used to display detailed information for a specific airport-city combination.

public airportCity(Request $request, MetaService $metaService) : string|Response

This method retrieves and compiles all relevant data for a given airport and city pair, including transportation options (shuttle, transit, limo, taxi, public transportation, etc.), city-to-airport travel details, Viator and shuttle service rates, terminal information, and other related content. It also prepares meta information for SEO and handles caching for performance. If the airport or city is not found, a 404 error page is shown.

The airport is identified by the first URL segment (ICAO or LOCID code), and the city by the second segment.

Parameters
$request : Request

The HTTP request instance.

$metaService : MetaService

Service for generating meta tags/content.

Return values
string|Response

Rendered HTML for the airport-city info page, or a 404 response.

airportCode()

This function is used to redirect airportcode to icao_identifier.

public airportCode(Request $request, MetaService $metaService) : Response

This method checks if an airport exists for the provided code (LOCID or ICAO ID) from the URL segment. If the airport exists and has an ICAO ID, it returns a 404 error page. If the airport exists without an ICAO ID, it displays the airport information page. If the airport is not found, a 404 error page is shown.

Parameters
$request : Request

The HTTP request instance.

$metaService : MetaService
Return values
Response

Rendered HTML for the airport info page, or a 404 response.

airportCodeAny()

Handle airport code routing with additional parameters.

public airportCodeAny(Request $request, MetaService $metaService) : Response

This method processes airport codes from URL segments and determines the appropriate routing behavior. If an airport not exists with an ICAO identifier, it returns a 404 error. If the airport exists without an ICAO identifier, it redirects to the airport city information page. If no airport is found, it returns a 404 error.

Parameters
$request : Request

The HTTP request instance

$metaService : MetaService
Tags
see
Request::segments()

To extract URL segments for airport code and parameters

uses
Airports19k

Model to query airport data by LOCID or ICAO identifier

Return values
Response

Either a 404 error page or airport city information page

airportInfo()

This function is used to display detailed information for a specific airport.

public airportInfo(Request $request, MetaService $metaService) : string|Response

This method retrieves and compiles all relevant data for a given airport, including general information, transportation options (shuttle, transit, limo, rental cars, parking, hotels), terminal details, weather, top destinations, top airlines, and management contacts. It also handles caching for performance, and prepares all data for rendering the airport's "about" page in the frontend.

The airport is identified by the first URL segment (ICAO or LOCID code). If the airport is not found, or required data is missing, a 404 error page is shown.

Parameters
$request : Request

The HTTP request instance.

$metaService : MetaService

Service for generating meta tags/content.

Return values
string|Response

Rendered HTML for the airport info page, or a 404 response.

airportInfoByLocId()

This function is used to retrieve detailed airport information by airport code.

public airportInfoByLocId(string $locid) : stdClass

This method fetches airport information from an external API using the provided LOCID. It returns a standard object containing airport details such as name, address, contact info, manager details, and geometry. If no data is found, it returns a default object with placeholder values.

Parameters
$locid : string

The airport code (LOCID) to look up.

Return values
stdClass

An object containing airport information, or default values if not found.

airportMapDetail()

This function is used to display the detailed map and related information for a specific airport.

public airportMapDetail(Request $request, MetaService $metaService) : string|Response

This method retrieves and compiles all relevant data for a given airport's map page, including airport images, terminal details, and other associated information. It checks for the existence of required map data and images, prepares meta information for SEO, and renders the airport map detail page in the frontend. If the airport or its map data is not found, a 404 error page is shown.

The airport is identified by the first URL segment (ICAO or LOCID code).

Parameters
$request : Request

The HTTP request instance.

$metaService : MetaService

Service for generating meta tags/content.

Return values
string|Response

Rendered HTML for the airport map detail page, or a 404 response.

allAirlinesDetails()

Display comprehensive airline information and details page.

public allAirlinesDetails(Request $request, MetaService $metaService) : Response

This function is used to retrieve and processes airline data from external APIs, organizes airlines by country (US airlines vs international), and renders a comprehensive airlines listing page. It includes intelligent caching for performance optimization, SEO meta information management, and major airport data integration for enhanced user experience and search functionality.

Parameters
$request : Request

Contains session data and preview parameters

$metaService : MetaService

Service for managing SEO meta information

Return values
Response

Rendered airlines listing page with caching support

allAirports()

This function is used to display a comprehensive list of all airports with caching support.

public allAirports(Request $request, MetaService $metaService) : string

This method retrieves airport data from the database, organizes it alphabetically, and renders a complete HTML page with header, content, and footer. The response is cached for non-logged-in users to improve performance.

Parameters
$request : Request

The HTTP request instance

$metaService : MetaService

Service for retrieving airport metadata

Tags
uses
DB

For database queries to retrieve airport information

uses
view()

For rendering Blade templates

Return values
string

The rendered HTML content for the all airports page

cityDataInfo()

This function is used to city information.

public cityDataInfo(Request $request) : mixed

This function is not in used ans also view file

Parameters
$request : Request

countryInfo()

This function is used to display an overview of all U.S. states and their airports.

public countryInfo(Request $request, MetaService $metaService) : string|Response

This method retrieves and compiles a list of all U.S. states (excluding Puerto Rico) and their associated airports, prepares meta information for SEO, and renders the country-level airport guide page in the frontend. It also handles caching for performance.

Parameters
$request : Request

The HTTP request instance.

$metaService : MetaService

Service for generating meta tags/content.

Return values
string|Response

Rendered HTML for the country info page, or a 404 response.

destinationInfo()

This function is used to display a comprehensive list of all airlines and their details.

public destinationInfo(Request $request, mixed $icao_identifier, mixed $slug, MetaService $metaService) : string|Response

This method retrieves and compiles a list of all airlines, organizes them by country, prepares meta information for SEO, and renders the all-airlines information page in the frontend. It also handles caching for performance. If required data is not found, a 404 error page is shown.

Parameters
$request : Request

The HTTP request instance.

$icao_identifier : mixed
$slug : mixed
$metaService : MetaService

Service for generating meta tags/content.

Return values
string|Response

Rendered HTML for the all-airlines information page, or a 404 response.

formateHeadingFromSlug()

This function is used to format a slug string into a human-readable heading.

public formateHeadingFromSlug(string $slug_heading) : string

Converts underscores, hyphens, and plus signs to spaces, lowercases the string, and capitalizes each word to create a user-friendly heading from a slug.

Parameters
$slug_heading : string

The slug to format.

Return values
string

The formatted heading.

getBreadCrumbs()

This function is used to generate the HTML for page breadcrumbs navigation.

public getBreadCrumbs(Page $content) : string

This method builds a breadcrumb trail for the given page content, reflecting its position in the site hierarchy. It uses the page's slug and parent relationships to create navigational links for display in the frontend.

Parameters
$content : Page
Return values
string

HTML markup for the breadcrumbs

getCity()

This function is used to fetch and display additional city-related data for a specific airport.

public getCity(Request $request) : Response|bool

This method retrieves a paginated list of Viator activities or services for a given airport and city, based on the provided request parameters (city name, airport locid, and page number). The results are rendered using an AJAX Blade view for dynamic frontend updates. If no data is found, it returns false.

Parameters
$request : Request

The HTTP request instance, containing 'city', 'locid', and 'page' parameters.

Return values
Response|bool

Rendered HTML for the city data (AJAX), or false if no data is found.

getDownloadPdfAirportMap()

This function is used to generate and stream a PDF of the airport map for a specific airport.

public getDownloadPdfAirportMap(Request $request) : StreamedResponse|Response

This method retrieves the relevant airport and map data based on the URL segments, checks for the existence of the required map image and description, and generates a PDF file using a Blade view. The PDF is streamed to the browser for download. If the airport or map data is not found, a 404 error page is shown.

The airport is identified by the ICAO or LOCID code in the URL.

Parameters
$request : Request

The HTTP request instance.

Return values
StreamedResponse|Response

The streamed PDF file, or a 404 response if data is missing.

getDownloadPdfData()

This function is used to generate and stream a PDF of a specific airport terminal map.

public getDownloadPdfData(Request $request) : StreamedResponse|Response

This method retrieves the relevant terminal and image data for a given airport and terminal (by locid and slug), generates a PDF file using a Blade view, and streams it to the browser for download. If the airport, terminal, or required data is not found, a 404 error page is shown.

Parameters
$request : Request

The HTTP request instance.

Return values
StreamedResponse|Response

The streamed PDF file, or a 404 response if data is missing.

getMoreCharterBus()

This function is used to fetch and display additional paginated charter bus data for a specific airport.

public getMoreCharterBus(Request $request) : Response|bool

This method retrieves a paginated list of charter bus companies for a given airport (by locid), using the provided page number for pagination. The results are rendered using an AJAX Blade view for dynamic frontend updates. If no data is found, it returns false.

Parameters
$request : Request

The HTTP request instance, containing 'locid' and 'page' parameters.

Return values
Response|bool

Rendered HTML for the additional charter bus data (AJAX), or false if no data is found.

getMoreCities()

This function is used to fetch and display additional paginated city data for a specific airport.

public getMoreCities(Request $request) : Response|bool

This method retrieves a paginated list of cities associated with a given airport (by locid), using an external API, and renders the results using an AJAX Blade view for dynamic frontend updates. It supports pagination via the 'page' parameter and includes the airport's ICAO code if available. If no data is found, it returns false.

Parameters
$request : Request

The HTTP request instance, containing 'locid', 'page', and optionally 'service_id'.

Return values
Response|bool

Rendered HTML for the additional cities (AJAX), or false if no data is found.

getMoreLimo()

This function is used to fetch and display additional paginated limo data for a specific airport.

public getMoreLimo(Request $request) : Response|bool

This method retrieves a paginated list of limo companies for a given airport (by locid), using the provided page number for pagination. The results are rendered using an AJAX Blade view for dynamic frontend updates. If no data is found, it returns false.

Parameters
$request : Request

The HTTP request instance, containing 'locid' and 'page' parameters.

Return values
Response|bool

Rendered HTML for the additional limo data (AJAX), or false if no data is found.

getMoreLimoTaxi()

This function is used to fetch and display additional paginated limo/taxi data for a specific airport.

public getMoreLimoTaxi(Request $request) : Response|bool

This method retrieves a paginated list of limo/taxi companies for a given airport (by locid), using the provided page number for pagination. The results are rendered using an AJAX Blade view for dynamic frontend updates. If no data is found, it returns false.

Parameters
$request : Request

The HTTP request instance, containing 'locid' and 'page' parameters.

Return values
Response|bool

Rendered HTML for the additional limo/taxi data (AJAX), or false if no data is found.

getMoreScheduledBus()

This function is used to fetch and display additional paginated scheduled bus data for a specific airport.

public getMoreScheduledBus(Request $request) : Response|bool

This method retrieves a paginated list of scheduled bus companies for a given airport (by locid), using the provided page number for pagination. The results are rendered using an AJAX Blade view for dynamic frontend updates. If no data is found, it returns false.

Parameters
$request : Request

The HTTP request instance, containing 'locid' and 'page' parameters.

Return values
Response|bool

Rendered HTML for the additional scheduled bus data (AJAX), or false if no data is found.

getMoreShuttle()

This function is used to fetch and display additional paginated shuttle data for a specific airport.

public getMoreShuttle(Request $request) : Response|bool

This method retrieves a paginated list of shuttle companies for a given airport (by locid), using the provided page number for pagination. The results are rendered using an AJAX Blade view for dynamic frontend updates. If no data is found, it returns false.

Parameters
$request : Request

The HTTP request instance, containing 'locid' and 'page' parameters.

Return values
Response|bool

Rendered HTML for the additional shuttle data (AJAX), or false if no data is found.

getMoreTransport()

This function is used to fetch and display additional paginated transit data for a specific airport.

public getMoreTransport(Request $request) : Response|bool

This method retrieves a paginated list of transit companies for a given airport (by locid), using the provided page number for pagination. The results are rendered using an AJAX Blade view for dynamic frontend updates. If no data is found, it returns false.

Parameters
$request : Request

The HTTP request instance, containing 'locid' and 'page' parameters.

Return values
Response|bool

Rendered HTML for the additional transit data (AJAX), or false if no data is found.

gettop100ShuttlesCity()

This function is used to retrieve and display the top 100 shuttle services for cities associated with a specific airport.

public gettop100ShuttlesCity(Request $request, MetaService $metaService) : Response

This method processes airport identification from URL segments, validates airport data, fetches shuttle and limo services, and renders a comprehensive view with city information, terminal details, and transportation options.

Parameters
$request : Request

The HTTP request instance containing 'preview' and 'page' parameters.

$metaService : MetaService

Service for generating meta information

Tags
throws
Exception

When airport data cannot be retrieved or processed

Return values
Response

Returns a rendered view with airport shuttle information or a 404 error page if airport data is not found

pageNotFound()

This function is used to display the custom 404 "Page Not Found" error page with site navigation and content context.

public pageNotFound(Request $request) : void

This method prepares and renders the 404 error page, including global site settings, navigation menus, testimonials, and other dynamic content, to provide a consistent user experience even when a page is not found.

Parameters
$request : Request

pageShow()

This functio Display dynamic or static inner pages based on the requested URL segments.

public pageShow(Request $request) : Response|string

This method determines the requested page from the URL, fetches the corresponding page content and metadata from the database, handles visibility (public, private, password-protected), and renders the appropriate view (static, dynamic, or 404) with all necessary site context.

Parameters
$request : Request
Return values
Response|string

passwordProtected()

This function is used to validate password protection for a specific page and set a cookie if successful.

public passwordProtected(Request $request) : JsonResponse

This method checks if the provided password matches the password for a page (by page alias). If the password is correct, it sets a cookie to allow access and returns a JSON success response. If the password is incorrect, it returns a JSON error response. This is typically used for AJAX requests to handle password-protected pages in the frontend.

Parameters
$request : Request

The HTTP request instance, containing 'pageAlias' and 'newpassword' parameters.

Return values
JsonResponse

JSON response indicating success or error.

Retrieve and return the external TripAdvisor link for a specific hotel at an airport.

public redirectLink(Request $request) : JsonResponse

This method looks up a hotel by its airport code and ID, and if found, returns a JSON response with the TripAdvisor link for that hotel. If the hotel is not found, it returns a JSON error response. This is typically used for AJAX requests to redirect users to external hotel review pages.

Parameters
$request : Request

The HTTP request instance

Tags
uses
HotelsAirportFlyer

Model to query hotel data by airport code and ID

Return values
JsonResponse

JSON response with the TripAdvisor link or an error status

redirectLinkCity()

Retrieve and return the external company link for a specific city shuttle service.

public redirectLinkCity(Request $request) : JsonResponse

This method looks up a shuttle service rate by airport code and ID, and if found, returns a JSON response with the company's URL. If the service is not found, it returns a JSON error response. This is typically used for AJAX requests to redirect users to external shuttle or transportation company pages.

Parameters
$request : Request

The HTTP request instance

Tags
uses
ShuttleServicesRates

Model to query shuttle service data by airport code and ID

Return values
JsonResponse

JSON response with the company link or an error status

redirectLinkOfficial()

This function is used to retrieve and return the official external link for a specific airport service (transit, limo-taxi, shuttle, or Viator).

public redirectLinkOfficial(Request $request) : JsonResponse

This method looks up a service (transit, limo-taxi, shuttle, or Viator) by airport code, service type, and ID. If found, it returns a JSON response with the official company or product link. If the service is not found, it returns a JSON error response. This is typically used for AJAX requests to redirect users to external official service provider pages.

Parameters
$request : Request

The HTTP request instance, containing 'code', 'id', and 'service_type' parameters.

Return values
JsonResponse

JSON response with the official company or product link, or an error status.

redirectLinkViator()

Retrieve and return the external Viator product link for a specific airport activity.

public redirectLinkViator(Request $request) : JsonResponse

This method looks up a Viator activity by airport code and ID, and if found, returns a JSON response with the Viator product URL. If the activity is not found, it returns a JSON error response. This is typically used for AJAX requests to redirect users to external Viator activity pages.

Parameters
$request : Request

The HTTP request instance

Tags
uses
Viator

Model to query activity data by airport code and ID

Return values
JsonResponse

JSON response with the Viator product link or an error status

renderingDiagram()

This function is used to generate an embedded iframe diagram for a specific airport location.

public renderingDiagram(Request $request) : string|false

This method creates an HTML iframe element that embeds an interactive airport diagram from the geosphere.io service. The diagram provides a visual representation of the airport layout and is configured with proper security attributes for seamless web integration.

Parameters
$request : Request

The HTTP request instance containing:

  • 'locId' (required): The airport location identifier
Tags
throws
Exception

When the external diagram service is unavailable

Return values
string|false

Returns HTML iframe code for the airport diagram if locId is provided, otherwise returns false if no location identifier is specified

renderingMap()

This function is used to generate an embedded iframe map for a specific airport location.

public renderingMap(Request $request) : string|false

This method creates an HTML iframe element that embeds an interactive airport map from the geosphere.io service. The map is configured with proper security attributes and responsive design parameters for seamless integration into web pages.

Parameters
$request : Request

The HTTP request instance containing:

  • 'locId' (required): The airport location identifier
Tags
throws
Exception

When the external map service is unavailable

Return values
string|false

Returns HTML iframe code for the airport map if locId is provided, otherwise returns false if no location identifier is specified

searchList()

This function is used to search for airports by name, city, airport code, or ICAO ID.

public searchList(Request $request) : JsonResponse

This method performs a search for airports based on a user-provided term, matching against airport name, city, airport code, or ICAO ID. The results are returned as a JSON array suitable for autocomplete or search dropdowns in the frontend.

Parameters
$request : Request

The HTTP request instance, containing the 'term' parameter.

Return values
JsonResponse

JSON-encoded array of matching airports for autocomplete/search.

searchListContact()

This function is used to search for airports by name, city, airport code, or ICAO ID for contact-related queries.

public searchListContact(Request $request) : JsonResponse

This method performs a search for airports based on a user-provided term, matching against airport name, city, airport code, or ICAO ID. The results are returned as a JSON array suitable for autocomplete or search dropdowns in contact forms or related frontend components.

Parameters
$request : Request

The HTTP request instance, containing the 'term' parameter.

Return values
JsonResponse

JSON-encoded array of matching airports for autocomplete/search.

searchListContacttwo()

This function is used to search for a single airport by name, city, airport code, or ICAO ID for contact-related queries (with special input handling).

public searchListContacttwo(Request $request) : Model|bool

This method searches for an airport based on a user-provided term, which may include the airport name and airport code in parentheses (e.g., "San Francisco (SFO)"). It matches against airport name, city, airport code, or ICAO ID, and returns the first matching airport record or false if none is found. This is typically used for contact forms or related frontend components.

Parameters
$request : Request

The HTTP request instance, containing the 'term' parameter.

Return values
Model|bool

The first matching airport record, or false if not found.

searchListtwo()

This function is used to search for a single airport by name, city, airport code, or ICAO ID (with special handling for input format).

public searchListtwo(Request $request) : Model|bool

This method searches for an airport based on a user-provided term, which may include the airport name and airport code in parentheses (e.g., "San Francisco (SFO)"). It matches against airport name, city, airport code, or ICAO ID, and returns the first matching airport record or false if none is found.

Parameters
$request : Request

The HTTP request instance, containing the 'term' parameter.

Return values
Model|bool

The first matching airport record, or false if not found.

searchTerm()

This function is used to search for airports based on a search term extracted from the URL segment.

public searchTerm(Request $request, MetaService $metaService) : string

This method performs a case-insensitive search across airport names, cities, location IDs, and ICAO identifiers. It retrieves the search term from the second URL segment and renders a search results page with matching airports.

Parameters
$request : Request

The HTTP request instance

$metaService : MetaService

Service for retrieving airport metadata

Tags
uses
DB

For database queries to search airport information

uses
view()

For rendering the search results template

Return values
string

The rendered HTML content for the search results page

shuttleSearchList()

This function is used to search for shuttle destination cities for a specific airport.

public shuttleSearchList(Request $request) : JsonResponse

This method searches a cached JSON file of all shuttle destination cities for a given airport (by locid), filtering the results by a user-provided search term. It returns a JSON response containing the filtered city data and the airport's ICAO identifier, suitable for use in autocomplete or search dropdowns.

Parameters
$request : Request

The HTTP request instance, containing 'term' and 'locid' parameters.

Return values
JsonResponse

JSON-encoded array of filtered city data and the ICAO identifier.

shuttleSearchListTwo()

This function is used to search for a specific shuttle destination city for a given airport.

public shuttleSearchListTwo(Request $request) : JsonResponse

This method searches a cached JSON file of all shuttle destination cities for a given airport (by locid), filtering the results by a user-provided city name (case-insensitive, with capitalization). It returns a JSON response with the first or only matching city data, or an error if the file is not found.

Parameters
$request : Request

The HTTP request instance, containing 'searchcity' and 'locid' parameters.

Return values
JsonResponse

JSON-encoded city data for the first/only match, or an error response if not found.

stateInfo()

This function is used to display detailed information for a specific U.S. state and its airports.

public stateInfo(Request $request, MetaService $metaService) : string|Response

This method retrieves and compiles all relevant data for a given state, including state information, a list of major airports, and categorized airport lists (PCA, CSA, RA, GAA). It also prepares meta information for SEO and handles caching for performance. If the state or its airports are not found, a 404 error page is shown.

The state is identified by the first URL segment (state code).

Parameters
$request : Request

The HTTP request instance.

$metaService : MetaService

Service for generating meta tags/content.

Return values
string|Response

Rendered HTML for the state info page, or a 404 response.

teminalImage()

This function is used to display a specific terminal level image and its details for an airport terminal.

public teminalImage(Request $request, MetaService $metaService) : string|Response

This method retrieves and displays a specific terminal level image and its associated details for a given airport (identified by ICAO ID or airport code/LOCID), terminal slug, and level name. It prepares meta information for SEO and renders the terminal image detail page in the frontend. If the airport, terminal, or image is not found, a 404 error page is shown.

Parameters
$request : Request

The HTTP request instance.

$metaService : MetaService

Service for generating meta tags/content.

Return values
string|Response

Rendered HTML for the terminal image detail page, or a 404 response.

terminalInfo()

This function is used to fetch and display detailed terminal information for a specific airport and terminal.

public terminalInfo(string $icao_identifier, string $slug, Request $request, MetaService $metaService) : string|Response

This method retrieves terminal details, images, business listings, and related information for a given airport (identified by ICAO ID or airport code/LOCID) and terminal (by slug). It prepares meta information for SEO and renders the terminal information page in the frontend. If the airport, terminal, or required data is not found, a 404 error page is shown.

Parameters
$icao_identifier : string

The airport identifier: ICAO ID (e.g., 'KSFO') or airport code (LOCID, e.g., 'SFO').

$slug : string

The terminal slug or alias.

$request : Request

The HTTP request instance.

$metaService : MetaService

Service for generating meta tags/content.

Return values
string|Response

Rendered HTML for the terminal information page, or a 404 response.


        
On this page

Search results