承接 lizzyman04/fluxor 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lizzyman04/fluxor

Composer 安装命令:

composer require lizzyman04/fluxor

包简介

A lightweight PHP MVC engine with file-based routing and elegant Flow syntax.

README 文档

README

The lightweight PHP MVC core that powers Fluxor framework - File-based routing, elegant Flow syntax, and zero bloat.

Latest Stable Version Total Downloads License PHP Version Require

📦 What is Fluxor Core?

Fluxor Core is the engine behind the Fluxor PHP framework - a minimal, elegant, and powerful MVC core designed for developers who want simplicity without sacrificing functionality.

Unlike monolithic frameworks, Fluxor Core gives you:

  • 🚀 Blazing fast performance (boot under 10ms)
  • 📦 Minimal dependencies - routing is powered by the standalone, zero-dependency lizzyman04/file-router package; nothing else
  • 🔍 Transparent code - no magic, you can read everything
  • 🎯 File-based routing inspired by Next.js
  • 💎 Elegant Flow syntax for route definitions
  • 🔒 Config locking to protect critical settings
  • 🌐 Built-in CORS support (global + per-route)

🚀 Quick Start

composer require lizzyman04/fluxor
<?php
require 'vendor/autoload.php';

$app = new Fluxor\Core\App();
$app->run();

🎯 Imports

Import core classes from their namespaces (PSR-4 autoloaded):

use Fluxor\Core\App;
use Fluxor\Core\Http\Request;
use Fluxor\Core\Http\Response;
use Fluxor\Core\Routing\Flow;
use Fluxor\Core\View;

Breaking change in 2.0: the short-name aliases Fluxor\Flow, Fluxor\App, Fluxor\Response, etc. were removed. Use the fully-qualified namespaces above.

💡 Core Concepts

Application Instance

$app = new Fluxor\Core\App();
$basePath = $app->getBasePath();  // Auto-detected!
$baseUrl = $app->getBaseUrl();    // Auto-detected!

Global CORS Configuration

$app = new Fluxor\Core\App();
$app->cors()->allowOrigin('*')->enable();
$app->run();

File-based Routing

The directory structure is the route table. URL matching (dynamic [id], catch-all [...slug], route groups, the compiled-route cache) is handled by the standalone lizzyman04/file-router engine; Fluxor adds the Flow syntax and dispatch on top. The route-file syntax below is unchanged.

// app/router/users/[id].php
use Fluxor\Core\Routing\Flow;
use Fluxor\Core\Http\Response;

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

Router with Middleware

$router = $app->getRouter();
$router->addMiddleware('auth', function($request) {
    if (!$request->isAuthenticated()) {
        return Fluxor\Core\Http\Response::redirect('/login');
    }
});

Request & Response

use Fluxor\Core\Http\Response;

$id = $request->param('id');
$email = $request->input('email');
$token = $request->bearerToken();

return Response::json(['user' => $user]);
return Response::view('profile', ['user' => $user]);

Flow Syntax

use Fluxor\Core\Routing\Flow;

// Simple route
Flow::GET()->do(fn($req) => 'Hello World');

// Controller binding
Flow::POST()->to(UserController::class, 'store');

// Middleware
Flow::use(fn($req) => $req->isAuthenticated() ? null : redirect('/login'));

View System

// In controller
return Response::view('home', ['title' => 'Home']);

// In view (home.php)
View::extend('layouts/main');
View::section('content');
    <h1><?= View::e($title) ?></h1>
View::endSection();

Global Helpers

// Environment variables
$debug = env('APP_DEBUG', false);
$dbName = env('DB_NAME', 'database');

// Path helpers
$root = base_path();
$url = base_url('api/users');
$asset = asset('css/app.css');

// HTTP helpers
abort(404, 'Not Found');
return redirect('/dashboard');

// Debug helpers
dump($user);
dd($data);  // Dump and die

📚 Documentation

Full documentation available at: 👉 https://fluxor.tudocomlizzyman.com

The documentation includes:

  • Installation guide
  • File-based routing
  • Flow syntax reference
  • Views and layouts
  • Controllers and middleware
  • Environment configuration
  • Complete API reference with helper functions

📄 License

MIT License - see LICENSE file for details.

Fluxor - Build elegant PHP applications with joy! 🎉

lizzyman04/fluxor 适用场景与选型建议

lizzyman04/fluxor 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 111 次下载、GitHub Stars 达 15, 最近一次更新时间为 2026 年 03 月 17 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「framework」 「flow」 「php」 「api」 「mvc」 「router」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 lizzyman04/fluxor 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 lizzyman04/fluxor 我们能提供哪些服务?
定制开发 / 二次开发

基于 lizzyman04/fluxor 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 111
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 15
  • 点击次数: 25
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 15
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-17