|
|
2 éve | |
|---|---|---|
| app | 2 éve | |
| bootstrap | 2 éve | |
| config | 2 éve | |
| database | 2 éve | |
| public | 2 éve | |
| resources | 2 éve | |
| routes | 2 éve | |
| storage | 2 éve | |
| tests | 2 éve | |
| .editorconfig | 2 éve | |
| .env.example | 2 éve | |
| .gitattributes | 2 éve | |
| .gitignore | 2 éve | |
| README.md | 2 éve | |
| artisan | 2 éve | |
| composer.json | 2 éve | |
| composer.lock | 2 éve | |
| package.json | 2 éve | |
| phpunit.xml | 2 éve | |
| vite.config.js | 2 éve |
Airports search API is a RESTful web service for searching airports data.
URL: /api/search
Method: GET
URL Params:
query=[string] - The query string to search for.
Success Response:
Code: 200
Content: JSON array of matching airports
Install the Composer dependencies:
composer install
Setup the Environment File:
cp .env.example .env
Configure Elasticsearch comma-separated hosts in .env file
ELASTICSEARCH_HOSTS=localhost:9200,localhost:9201
Generate the application key:
php artisan key:generate
Create the Elasticsearch Index:
php artisan update-airports-index
Start the Laravel server:
php artisan serve
php artisan test