codemonster-ru / annabel
Elegant and lightweight PHP framework for modern web applications
Installs: 23
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/codemonster-ru/annabel
Requires
- php: >=8.2
- codemonster-ru/razor: ^1.0
- codemonster-ru/support: ^1.0
- codemonster-ru/view-php: ^2.0
Requires (Dev)
- phpunit/phpunit: ^9.6 || ^10.5 || ^11.0 || ^12.0
Suggests
- codemonster-ru/ssr-bridge: Enable Vue/React/Svelte SSR rendering bridge
README
Elegant and lightweight PHP framework for modern web applications.
๐ฆ Installation
composer require codemonster-ru/annabel
๐ Quick Start
// public/index.php require __DIR__ . '/../vendor/autoload.php'; $app = require __DIR__ . '/../bootstrap/app.php'; $app->run(); // bootstrap/app.php use Codemonster\Annabel\Application; $baseDir = __DIR__ . '/..'; $app = new Application($baseDir); require "$baseDir/routes/web.php"; return $app; // routes/web.php router()->get('/', fn() => view('home', ['title' => 'Welcome to Annabel']));
๐งฉ Helpers
| Function | Description |
|---|---|
app() |
Access the application container |
base_path() |
Resolve base project paths |
config() |
Get or set configuration values |
dump() / dd() |
Debugging utilities |
env() |
Read environment variables |
request() |
Get current HTTP request |
response()/ json() |
Create HTTP response |
router() / route() |
Access router instance |
session()/ render() |
Read, write, or access session store |
view() |
Render or return view instance |
๐งช Testing
You can run tests with the command:
composer test