elasticmind/lalaz-framework

The Lalaz framework.

Installs: 188

Dependents: 1

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 2

Open Issues: 2

Type:project

pkg:composer/elasticmind/lalaz-framework

v1.1.10 2025-08-19 00:25 UTC

This package is auto-updated.

Last update: 2025-12-09 23:54:10 UTC


README

Welcome to Lalaz Framework v1.0 โ€“ A modern, fast, and elegant PHP framework designed for developers who value clean code, excellent performance, and great developer experience.

๐Ÿš€ Why Lalaz?

Lalaz Framework combines the best practices from modern PHP development with a focus on:

  • โšก Performance - Router cache (50x faster), Config cache (300x faster)
  • ๐Ÿ” Security - Built-in CSRF protection, security headers, bcrypt hashing
  • ๐ŸŽจ Clean Architecture - PSR-compliant, dependency injection, middleware pipeline
  • ๐Ÿ“ Great DX - Intuitive CLI, detailed error messages, extensive documentation
  • ๐Ÿงช Well Tested - 308 tests, 847 assertions, 100% passing
  • ๐Ÿ”ง Flexible - Template-engine agnostic, multiple database adapters

๐Ÿ“š Documentation Structure

Getting Started

Core Concepts

  • Database - Query builder, migrations, and seeders
  • Models - ActiveRecord pattern and relationships
  • Views - Templates, view helpers, and rendering
  • Validation - Form validation and error handling

Advanced Topics

Production

  • Performance - Optimization tips and caching strategies
  • Deployment - Production setup and best practices

โšก Quick Start

Installation

composer require lalaz/framework

Create Your First Route

<?php
// routes/web.php

use Lalaz\Lalaz;

$router = Lalaz::router();

$router->get('/', function() {
    return 'Welcome to Lalaz Framework!';
});

$router->get('/hello/{name}', function($name) {
    return "Hello, {$name}!";
});

Run Development Server

php lalaz serve

Visit http://localhost:8080 and you're ready! ๐ŸŽ‰

๐ŸŽฏ Key Features

Routing

  • Clean, expressive syntax
  • Route parameters and constraints
  • Route groups with shared middleware
  • 50x faster with route caching

Database

  • Fluent query builder
  • ActiveRecord models with relationships
  • Migration system for version control
  • Support for MySQL, PostgreSQL, SQLite

Views

  • Template-engine agnostic design
  • Built-in Twig provider
  • View helpers for common tasks
  • Layout and component support

Security

  • CSRF protection out of the box
  • Security headers middleware (4 presets)
  • Bcrypt password hashing
  • SQL injection prevention

Performance

  • Router cache: 50x faster (1ms โ†’ 0.02ms)
  • Config cache: 300x faster (2-3ms โ†’ 0.01ms)
  • OPcache optimization
  • ~90ms saved per request in production

CLI Tools

  • 9 code generators (controller, model, migration, etc.)
  • Database migrations and seeders
  • Cache management commands
  • Queue/job workers
  • Built-in development server

๐Ÿ“ฆ What's Included

Core Components

  • Router with middleware support
  • HTTP Request/Response objects
  • Dependency injection container
  • Session management
  • File upload handling

Data Layer

  • Query builder with fluent interface
  • ActiveRecord pattern
  • Relationships (hasMany, belongsTo, belongsToMany)
  • Database migrations
  • Database seeders

View Layer

  • Template engine support
  • View helpers (asset, route, CSRF, etc.)
  • Flash messages
  • Layout inheritance

Validation

  • 15+ built-in validation rules
  • Custom validation callbacks
  • Localized error messages
  • Array and JSON serialization

Logging

  • PSR-3 compliant logger
  • Multiple formatters (Text, JSON)
  • Multiple writers (File, Console)
  • Automatic log rotation
  • Level filtering

Queue System

  • Background job processing
  • Event system
  • Job scheduling
  • Daemon mode for continuous processing

๐Ÿค Requirements

  • PHP 8.1 or higher
  • Composer
  • PDO extension (for database)
  • One of: MySQL 5.7+, PostgreSQL 9.6+, or SQLite 3

๐Ÿ“– Learning Path

Beginners

  1. Installation Guide
  2. Routing Basics
  3. Controllers
  4. Views

Intermediate

  1. Database
  2. Models & Relationships
  3. Validation
  4. Middleware

Advanced

  1. Security
  2. Events & Jobs
  3. Performance Optimization
  4. Deployment

๐ŸŽ“ Philosophy

Lalaz Framework is built on these core principles:

  • Simplicity - Keep things simple and intuitive
  • Performance - Fast by default, optimized for production
  • Security - Secure defaults, easy to maintain
  • Flexibility - Don't force patterns, provide tools
  • Testing - Everything should be testable
  • Documentation - If it's not documented, it doesn't exist

๐Ÿ”— Useful Links

๐Ÿ’ก Need Help?

๐Ÿ“ License

Lalaz Framework is open-source software licensed under the MIT license.

Ready to build something amazing? Start with the Installation Guide! ๐Ÿš€