laikait / laika-framework
Laika PHP Framework
Package info
github.com/laikait/laika-framework
Language:CSS
Type:project
pkg:composer/laikait/laika-framework
Requires
- php: >=8.1
- laikait/laika-core: ^4.3
This package is auto-updated.
Last update: 2026-08-12 12:46:21 UTC
README
A lightweight, fast, and flexible MMC framework (Model-Middleware-Controller) for PHP 8.1+, built with simplicity in mind. Laika gives you routing, models, templating, a service container, and a CLI generator — without the overhead of large frameworks like Laravel or Symfony.
✨ Features
- 🚀 Lightweight core — no bloat, no magic you can't trace back to a file
- 🛠️ Expressive router — route groups, named routes, typed parameters, pipelines & filters
- 🗂️ PDO models & schema builder — MySQL, PostgreSQL, SQLite, SQL Server, Oracle, Firebird
- 🧩 Service container — a
Relaystatic-proxy pattern for clean, testable app services - 🔐 Security by default — direct file access denied, CSRF/CORS-ready, optional firewall middleware
- 🔑 Multi-guard auth — session, cookie, and token guards with Google/Facebook OAuth
- 🗃️ Sessions & queues — pluggable backends (file/PDO/Redis/Memcached, database/Redis/JSON)
- ⚙️ Built-in CLI (
php laika) — scaffold controllers, models, pipelines, filters, templates, and more - 📦 Composer-native — PSR-4 autoloading, each subsystem is its own versioned package
📦 Installation
composer create-project laikait/laika-framework myproject
cd myproject
php laika app:start
Visit http://127.0.0.1:8000 — you should see the default Laika landing page.
See docs/01_getting-started/01_installation.md for requirements and manual setup.
📚 Documentation
Full documentation lives in docs/:
| Section | What's covered |
|---|---|
| Getting Started | Installation, project structure, configuration, CLI |
| Routing | Routes, groups, named routes, controllers |
| Pipelines | Pre-controller middleware |
| Filters | Post-controller middleware |
| Models & Database | Query builder, schema builder, migrations |
| Templates | Twig-based view rendering |
| Services & Relay | The service container / static proxy pattern |
| Hooks | Event-style hook system |
| Authentication | Guards, tokens, OAuth |
| Security (Shield) | Firewall middleware |
| Sessions | Session backends and API |
| Queue | Background jobs and workers |
| Deployment | Apache/nginx, production checklist |
🧩 The Laika Ecosystem
laikait/laika-framework is the application skeleton; the actual functionality ships as independently versioned Composer packages under vendor/laikait/:
| Package | Purpose |
|---|---|
| laika-core | Bootstrap, templating, hooks, exceptions, framework glue |
| laika-route | Router, dispatcher, pipelines & filters |
| laika-model | PDO query builder & schema builder |
| laika-relay | Service container & static proxy (Relay) |
| laika-session | File/PDO/Redis/Memcached sessions |
| laika-auth | Session/cookie/token guards, OAuth |
| laika-shield | Firewall middleware (rate limiting, IP/country blocking, SQLi/XSS detection) |
| laika-queue | Background job queue & worker |
| laika-cli | The laika code generator CLI |
Each package has its own README with a full API reference — the docs here focus on how they fit together inside an application.
⌨️ CLI Quick Reference
php laika controller:make UserController php laika model:make User --table=users php laika pipeline:make Auth php laika filter:make Log php laika template:make admin/dashboard php laika route:list php laika app:migrate php laika app:start
Full command reference: docs/01_getting-started/04_cli.md.
🤝 Contributing
Issues and pull requests are welcome on the relevant package repository. For framework-wide changes, open an issue on laikait/laika-framework.
📄 License
MIT — see LICENSE.