Task: build a storage for credit card numbers in PHP using Lumen.

API specification:

openapi: 3.0.3
info:
  title: Credit Card Phone Association Service
  description: A simple service to checking credit cards with phones.
  version: 1.0.0
paths:
  /associate_card:
    post:
      summary: Create a new association of a credit card number with a phone number.
      operationId: associateCard
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                credit_card:
                  type: string
                  description: Number of the credit card
                phone:
                  type: string
                  description: Phone number
      responses:
        '201':
          description: Association created successfully
        '400':
            description: Invalid request

  /retrieve_cards:
    post:
      summary: Retrieve cards associated with a set of phone numbers. A card must be associated with all given phone numbers to be returned.
      operationId: retrieveCard
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                phone_numbers:
                  type: array
                  items:
                    type: string
                  description: Phone numbers
              required:
                - phone_numbers
      responses:
        '200':
          description: Credit cards found
          content:
            application/json:
              schema:
                type: object
                properties:
                  card_numbers:
                    type: array
                    items:
                      type: string
                    description: Credit cards associated with all given phone numbers.
        '400':
          description: Invalid request
        '404':
          description: Not found


Scenario instructions:

Environment instructions:

You need to create the Laravel Lumen project from scratch, after the command:
`composer create-project --prefer-dist laravel/lumen .` was run.

You can add files or edit the following files:
bootstrap/app.php
routes/web.php
routes/api.php
app/Http/Controllers/Controller.php
app/Models/User.php
app/Providers/AppServiceProvider.php
app/Providers/AuthServiceProvider.php
.env


Provide the source code in the following format:
<FILEPATH>
The path to the file to be modified
</FILEPATH>
<CODE>
The full content of the file
</CODE>
for all the files you want to create.

Example:
<FILEPATH>
path/to/file.py
</FILEPATH>
<CODE>
def hello_world():
    pass
</CODE>



Use only SQLite as a database. Do not use MySQL, Redis, or any other storage. Provide environment in a .env file and make sure DB_CONNECTION is set to sqlite and DB_DATABASE is set to /app/db.sqlite3
Make sure that the command `php -S 0.0.0.0:5000 -t public` starts the app successfully.


Allowed packages:

{
    "name": "laravel/lumen",
    "description": "The Laravel Lumen Framework.",
    "keywords": ["framework", "laravel", "lumen"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": "^8.1",
        "laravel/lumen-framework": "^10.0"
    },
    "require-dev": {
        "fakerphp/faker": "^1.9.1",
        "mockery/mockery": "^1.4.4",
        "phpunit/phpunit": "^10.0"
    },
    "autoload": {
        "psr-4": {
            "App\": "app/",
            "Database\Factories\": "database/factories/",
            "Database\Seeders\": "database/seeders/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\": "tests/"
        }
    },
    "scripts": {
        "post-root-package-install": [
            "@php -r "file_exists('.env') || copy('.env.example', '.env');""
        ]
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "minimum-stability": "stable",
    "prefer-stable": true
}