-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
Laureano F. Lamonega edited this page Jul 17, 2026
·
1 revision
composer create-project antimonial/antimonial my-app
cd my-appOr add to an existing project:
composer require antimonial/frameworkmy-app/
├── public/
│ └── index.php # Front controller
├── bootstrap/
│ └── app.php # App instance factory
├── app/
│ ├── Config/
│ │ ├── app.php # App configuration
│ │ └── database.php # Database configuration
│ ├── Controllers/ # Your controllers
│ ├── Models/ # Your models
│ ├── Routes/
│ │ └── web.php # Route definitions
│ └── Views/ # View templates
├── storage/
│ └── views/ # Compiled template cache
├── .env # Environment variables
└── composer.json
// public/index.php
<?php
define('ROOT_PATH', __DIR__ . '/..');
require ROOT_PATH . '/vendor/autoload.php';
Antimonial\Core\DotEnv::load(ROOT_PATH . '/.env');
Antimonial\Core\Config::load('app');
Antimonial\Core\Config::load('database');
Antimonial\Core\ErrorHandler::enableDebug((bool) env('APP_DEBUG', false));
Antimonial\View\View::setViewPath(ROOT_PATH . '/app/Views');
$app = require ROOT_PATH . '/bootstrap/app.php';
$app->run();Config files return arrays and are accessed via dot notation:
// app/Config/app.php
return [
'timezone' => env('APP_TIMEZONE', 'UTC'),
'session' => true, // Enable sessions (optional)
];
// Usage
$tz = config('app.timezone', 'UTC');// app/Config/database.php
return [
'default' => 'mysql',
'connections' => [
'mysql' => [
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', 3306),
'database' => env('DB_NAME', 'myapp'),
'username' => env('DB_USER', 'root'),
'password' => env('DB_PASS', ''),
],
],
];