Skip to content

Installation

It will pull in a skeleton project to get you started fast, with some example files

Terminal window
composer create-project fatjon-lleshi/antares-app

Core package, which pulls in the container, router, and validation packages automatically, best value will be gained fron installing the app above.

Terminal window
composer require fatjon-lleshi/antares

Each package can be used independently:

Terminal window
composer require fatjon-lleshi/antares-container
composer require fatjon-lleshi/antares-router
composer require fatjon-lleshi/antares-validation

Install optional bridge packages for logging and database access, these are convenience packages providing the service via auto Discovery you just skip the service registration part

Terminal window
composer require fatjon-lleshi/antares-monolog-bridge
composer require fatjon-lleshi/antares-eloquent-bridge

A typical Antares project looks like this:

my-app/
├── app/
│ ├── Controllers/
│ ├── DTOs/
│ ├── Guards/
│ ├── Middleware/
│ ├── Responses/
│ └── Providers/
│ ├── AppServiceProvider.php
│ └── RouteServiceProvider.php
├── public/
│ └── index.php
├── storage/
│ ├── cache/
│ └── logs/
├── .env.exmaple
└── composer.json
└── worker.php
└── swoole.php

Antares uses vlucas/phpdotenv to load environment variables. Create a .env file in your project root:

APP_ENV=local
APP_NAME=my-app
DB_DRIVER=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=my_db
DB_USERNAME=root
DB_PASSWORD=
LOG_CHANNEL=file
LOG_LEVEL=debug