Search by

laikait / laika-framework

riyadhtayf

Laika PHP Framework

Package info

github.com/laikait/laika-framework

Type:project

pkg:composer/laikait/laika-framework

Statistics

Installs: 48

Dependents: 0

Suggesters: 0

Stars: 3

Open Issues: 0

v5.0.0 2026-09-20 10:26 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.

Ask DeepWiki PHP License: MIT

✨ 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 containerRelay classes 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
Mail 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.