PHPackages                             swallowphp/framework - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. swallowphp/framework

ActiveLibrary[Framework](/categories/framework)

swallowphp/framework
====================

Swallow PHP framework

1.2.0(4mo ago)0197MITPHP

Since Dec 22Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/fzengin19/swallowphp-framework)[ Packagist](https://packagist.org/packages/swallowphp/framework)[ RSS](/packages/swallowphp-framework/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (5)Used By (0)

SwallowPHP Framework
====================

[](#swallowphp-framework)

A lightweight, modern PHP framework designed for simplicity and rapid development. SwallowPHP provides essential features for building web applications without the complexity of larger frameworks.

[![License: MIT](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](https://opensource.org/licenses/MIT)[![PHP Version](https://camo.githubusercontent.com/d4b5fa4adf514144779a7864904c5e15236c0e798635240c7f6ce9a455657b80/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e302532422d626c75652e737667)](https://php.net)[![Version](https://camo.githubusercontent.com/eb51bb608573ed3963bdb4cb86cfa953cdeb72193abb36632b29bfe9a5c4ba3a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f56657273696f6e2d312e312e302d6f72616e67652e737667)](https://github.com/swallowphp/framework)[![Total Downloads](https://camo.githubusercontent.com/23e7498363199a8c04937ec60111a3369271e28391b2517addd23cf3cc561af6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7377616c6c6f777068702f6672616d65776f726b2e737667)](https://packagist.org/packages/swallowphp/framework)

Features
--------

[](#features)

- **Dependency Injection** - Built on [League Container](https://container.thephpleague.com/) with auto-wiring support
- **Fluent Query Builder** - Intuitive database operations with PDO
- **Eloquent-style ORM** - Active Record pattern with relationships and events
- **Routing** - Simple, expressive route definitions with middleware support
- **Authentication** - Built-in authentication with remember me and brute-force protection
- **Session Management** - File-based sessions with flash messages
- **Caching** - PSR-16 compatible caching (file, SQLite drivers)
- **Logging** - PSR-3 compatible file-based logging
- **CSRF Protection** - Automatic cross-site request forgery protection
- **Rate Limiting** - Per-route request rate limiting

Requirements
------------

[](#requirements)

- PHP 8.0 or higher
- PDO extension (for database)
- JSON extension
- mbstring extension

Installation
------------

[](#installation)

Install via Composer:

```
composer require swallowphp/framework
```

Quick Start
-----------

[](#quick-start)

### 1. Create Entry Point

[](#1-create-entry-point)

Create a `public/index.php` file:

```
