laikait / laika-framework
Laika PHP Framework
Requires
- php: >=8.1
- laikait/laika-engine: 2.1.*
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- v5.0.0
- v4.4.0
- v4.3.6
- v4.3.5
- v4.3.4
- v4.3.3
- v4.3.2
- v4.3.1
- v4.2.10
- v4.2.9
- v4.2.8
- v4.2.7
- v4.2.6
- v4.2.5
- v4.2.4
- v4.2.3
- v4.2.2
- v4.2.1
- v4.1.3
- v4.1.2
- v4.1.1
- v4.1.0
- v4.0.72
- v4.0.71
- v4.0.4
- v4.0.3
- v4.0.2
- v4.0.1
- v4.0.0
- v3.1.0
- v3.0.6
- v3.0.5
- v3.0.4
- v3.0.3
- v3.0.2
- v3.0.1
- v3.0.0
- v2.4.4
- v2.4.3
- v2.4.2
- v2.4.1
- v2.3.9
- v2.3.8
- v2.3.7
- v2.3.6
- v2.3.5
- v2.3.4
- v2.3.3
- v2.3.2
- v2.3.1
- v2.2.1
- v2.1.2
- v2.1.1-stable
- v2.1.0-stable
- v2.0.0-stable
- v2.0.0-beta
- v1.0.0-stable
- v1.0.0-beta
- dev-beta
This package is auto-updated.
Last update: 2026-09-20 16:46:38 UTC
README
A secure, fast, and flexible Moduler First MVC framework 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, regex-constrained and UTF-8 parameters, pipelines & filters
- 💉 Dependency injection — controllers, pipelines and filters are auto-wired from the service container
- 🗂️ PDO models & schema builder — MySQL, PostgreSQL, SQLite, SQL Server, Oracle, Firebird, plus backups and a SQL converter
- 🧩 Service container —
Relayclasses give every service a clean static API - 🔐 Security by default — only whitelisted static files served, CSRF tokens injected into forms, CORS and security headers, encryption helpers, optional firewall (rate limiting, SQLi/XSS detection)
- 🔑 Multi-guard auth — session, cookie and database-backed bearer-token guards
- 🗃️ Sessions & queues — pluggable backends (file/database/Redis/Memcached sessions; JSON/database/Redis queues)
- ✉️ Mail — SMTP/sendmail sending and IMAP/POP3 reading
- ⚙️ Built-in CLI (
php laika) — scaffold controllers, models, pipelines, filters, jobs, commands, 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, request lifecycle, upgrading |
| Routing & HTTP | Routes, controllers, requests & validation, responses |
| Pipelines | Pre-controller middleware |
| Filters | Post-controller middleware |
| Models & Database | Models, query builder, schemas, migrations, backups |
| Templates | Twig views, assets, meta tags, navigation |
| Services & Relays | The service container and the relay list |
| Hooks | Hook files and the hook system |
| Authentication | Session, cookie and token guards |
| Security | Firewall, CSRF & CORS, encryption & tokens |
| Sessions | Session backends and API |
| Queue | Background jobs and workers |
| Deployment | Apache/nginx/PHP-FPM, production checklist |
| Resources | Class discovery and custom resource types |
| Helpers | Global helper functions |
| Files & Storage | Uploads, images, local and S3 storage |
| Sending and reading email | |
| Errors & Logging | Error handling, logs, activity log, options |
| Utilities | Dates, math, cron, shell commands |
The docs index also has a "common tasks" table — the fastest way to find how to do something.
🧩 The Laika Ecosystem
laikait/laika-framework is the application skeleton; the actual functionality ships in one Composer package, laikait/laika-engine, installed at vendor/laikait/laika-engine:
| Module | Namespace | Provides |
|---|---|---|
| Core | Laika\Engine\* (App, Http, Helper, Support, …) |
Bootstrap, request/response, validation, templates, helpers, storage, security, errors |
| Route | Laika\Engine\Route |
Router, dispatcher, pipelines and filters |
| Model | Laika\Engine\Model |
PDO query builder, schema builder, backup, SQL converter |
| Relay | Laika\Engine\Relay, Laika\Engine\Services |
Service container, relay base class and the core service relays |
| Session | Laika\Engine\Session |
File, database, Redis and Memcached session handlers |
| Auth | Laika\Engine\Auth |
Session, cookie and token guards |
| Shield | Laika\Engine\Shield |
Firewall pipeline (rate limiting, IP/country blocking, SQLi/XSS detection) |
| Queue | Laika\Engine\Queue |
Background job queue and worker |
| Cache | Laika\Engine\Cache |
Cache drivers: file, array, Redis, Memcached |
| Mailman | Laika\Engine\Mailman |
Mail sending (PHPMailer) and IMAP/POP3 reading |
| Cli | Laika\Engine\Cli |
The laika command-line tool |
The docs here explain how the modules fit together inside an application; the engine's docs/<module>/ folders go deeper into their internals.
⌨️ CLI Quick Reference
php laika controller:make UserController
php laika model:make UsersModel --table=users
php laika pipeline:make Auth
php laika filter:make Log
php laika job:make SendWelcomeEmail
php laika template:make dashboard --path=admin
php laika route:list
php laika app:migrate
php laika app:start
php laika help
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.