PHPackages                             lizzyman04/fluxor-php - 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. lizzyman04/fluxor-php

ActiveProject[Framework](/categories/framework)

lizzyman04/fluxor-php
=====================

Fluxor PHP Framework - Skeleton project for new applications

1.0.2(1mo ago)2860↓80%MITPHPPHP ^8.1CI passing

Since Apr 7Pushed 1mo agoCompare

[ Source](https://github.com/lizzyman04/fluxor-php)[ Packagist](https://packagist.org/packages/lizzyman04/fluxor-php)[ RSS](/packages/lizzyman04-fluxor-php/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (6)Versions (4)Used By (0)

 [![Fluxor Logo](https://raw.githubusercontent.com/lizzyman04/fluxor-php/main/public/assets/img/fluxor.svg)](https://raw.githubusercontent.com/lizzyman04/fluxor-php/main/public/assets/img/fluxor.svg)Fluxor PHP Framework
====================

[](#fluxor-php-framework)

**The lightweight PHP framework with file-based routing and elegant Flow syntax.**

[![Latest Stable Version](https://camo.githubusercontent.com/fb727c5992c0d5c68aa086dfa1a365d744b899ee1d5548ef3dfa3a6f942c1c5e/68747470733a2f2f706f7365722e707567782e6f72672f6c697a7a796d616e30342f666c75786f722d7068702f762f737461626c65)](https://packagist.org/packages/lizzyman04/fluxor-php) [![Total Downloads](https://camo.githubusercontent.com/9fbf66b000660fea2f39173dc5e6bc1c851ded72465e2971fbb4b057258c056d/68747470733a2f2f706f7365722e707567782e6f72672f6c697a7a796d616e30342f666c75786f722d7068702f646f776e6c6f616473)](https://packagist.org/packages/lizzyman04/fluxor-php) [![License](https://camo.githubusercontent.com/a70e56ebf36e581c5ba2c38363b1c0d29161d3403494054f1334c5fe47b0d511/68747470733a2f2f706f7365722e707567782e6f72672f6c697a7a796d616e30342f666c75786f722d7068702f6c6963656e7365)](https://packagist.org/packages/lizzyman04/fluxor-php) [![PHP Version Require](https://camo.githubusercontent.com/9054eb14646f61ff28eb8af84b2587176ffd866676522d4d4417bb20c8a3a004/68747470733a2f2f706f7365722e707567782e6f72672f6c697a7a796d616e30342f666c75786f722d7068702f726571756972652f706870)](https://packagist.org/packages/lizzyman04/fluxor-php)

Powered by [Fluxor Core](https://github.com/lizzyman04/fluxor) [![Core Version](https://camo.githubusercontent.com/57762310c2c3c9bccc9b47582e0169951bcd8cde72ae0f9254de5155a1da6883/68747470733a2f2f706f7365722e707567782e6f72672f6c697a7a796d616e30342f666c75786f722f762f737461626c65)](https://packagist.org/packages/lizzyman04/fluxor) [![Core Downloads](https://camo.githubusercontent.com/d6bd503887e358e9641a52b448a12e4ad05a0c66c21ee629f3d1d5840497a96f/68747470733a2f2f706f7365722e707567782e6f72672f6c697a7a796d616e30342f666c75786f722f646f776e6c6f616473)](https://packagist.org/packages/lizzyman04/fluxor)

 [📚 Documentation](https://lizzyman04.github.io/fluxor-php) • [🐙 GitHub ](https://github.com/lizzyman04/fluxor) • [📦 Packagist](https://packagist.org/packages/lizzyman04/fluxor-php)

📖 Documentation
---------------

[](#-documentation)

**Full documentation available at:** 👉 [**https://lizzyman04.github.io/fluxor-php**](https://lizzyman04.github.io/fluxor-php)

The documentation includes:

- 📚 Installation guide
- 🎯 File-based routing (Next.js style)
- 💎 Flow syntax reference
- 🎨 Views and layouts
- 🔧 Controllers and middleware
- ⚙️ Environment configuration
- 📖 Complete API reference with helper functions
- 🚀 Interactive installation guide

🚀 Quick Start
-------------

[](#-quick-start)

```
# Create a new Fluxor project
composer create-project lizzyman04/fluxor-php my-app

# Navigate to the project
cd my-app

# Start the development server
composer dev
```

Visit `http://localhost:8000`

✨ Features at a Glance
----------------------

[](#-features-at-a-glance)

### 🎯 File-based Routing

[](#-file-based-routing)

Routes defined by folder structure - like Next.js

```
app/router/
├── index.php           # GET /
├── api/
│   ├── users.php       # GET /api/users
│   └── users/[id].php  # GET /api/users/123
```

### 💎 Elegant Flow Syntax

[](#-elegant-flow-syntax)

Ultra-clean, chainable route definitions

```
Flow::GET()->do(function($req) {
    $id = $req->param('id');
    return Response::json(['user' => $id]);
});
```

### 🎨 Views &amp; Layouts

[](#-views--layouts)

Template system with sections and layouts

```
View::extend('layouts/main');
View::section('content');
    Hello World
View::endSection();
```

### 🔧 Controllers

[](#-controllers)

Organize your application logic

```
class UserController extends Controller
{
    public function index() {
        return Response::json(User::all());
    }
}
```

### 🛡️ Middleware &amp; Security

[](#️-middleware--security)

CSRF protection, sessions, request filtering

```
Flow::use(function($req) {
    if (!$req->isAuthenticated()) {
        return redirect('/login');
    }
});
```

### 🛠️ Utilities &amp; Helpers

[](#️-utilities--helpers)

Global helpers for common tasks

```
$url = base_url('api/users');
$path = base_path('storage/logs');
$debug = env('APP_DEBUG', false);
abort(404, 'Not Found');
```

📁 Project Structure
-------------------

[](#-project-structure)

After installation, your project will contain:

```
my-app/
├── app/
│   └── router/            # File-based routes
│       ├── index.php      # GET /
│       └── api/
│           └── users/     # REST API examples
├── public/
│   ├── index.php          # Front controller
│   └── assets/            # Static assets
├── src/
│   └── Views/             # View templates
│       ├── layouts/
│       └── home.php
├── storage/               # Logs, cache, sessions
├── .env                   # Environment configuration
└── composer.json          # Project dependencies

```

💎 Quick Example
---------------

[](#-quick-example)

```
