Fluxor Core is a minimal PHP MVC engine designed to provide simplicity and speed without sacrificing functionality. With features like file-based routing and an elegant Flow syntax, it ensures developers can build applications rapidly and efficiently, all while maintaining transparency and clarity in their code.
Fluxor Core is a lightweight PHP MVC engine designed to facilitate the creation of elegant applications while maintaining high performance and simplicity. With file-based routing and a refined Flow syntax, Fluxor Core enables developers to build robust web applications without the overhead associated with traditional frameworks.
Initialize the application easily:
$app = new Fluxor\App();
$basePath = $app->getBasePath(); // Auto-detected
$baseUrl = $app->getBaseUrl(); // Auto-detected
Seamlessly allow cross-origin requests:
$app->cors()->allowOrigin('*')->enable();
$app->run();
Set up routes efficiently:
Flow::GET()->do(function($req) {
$userId = $req->param('id');
return Response::success(['user' => $userId]);
});
Protect routes using middleware:
$router = $app->getRouter();
$router->addMiddleware('auth', function($request) {
if (!$request->isAuthenticated()) {
return Fluxor\Response::redirect('/login');
}
});
Handle various responses effectively:
return Response::json(['user' => $user]);
return Response::view('profile', ['user' => $user]);
Employ simple yet powerful routing methods:
Flow::GET()->do(fn($req) => 'Hello World');
Flow::POST()->to(UserController::class, 'store');
Flow::use(fn($req) => $req->isAuthenticated() ? null : redirect('/login'));
Render views from controllers easily:
return Response::view('home', ['title' => 'Home']);
Utilize convenient helper functions for better code:
$debug = env('APP_DEBUG', false);
$url = base_url('api/users');
abort(404, 'Not Found');
For comprehensive guidance on using Fluxor Core, refer to the full documentation available at Fluxor Documentation. This resource includes topics such as installation, routing, syntax, configurations, and an API reference.
Fluxor Core is the ideal choice for developers seeking a minimalistic yet powerful framework to enhance their PHP applications, allowing for elegant design and swift functionality.
No comments yet.
Sign in to be the first to comment.