承接 nixphp/app 相关项目开发

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

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

nixphp/app

Composer 安装命令:

composer create-project nixphp/app

包简介

Starter app for your project when using NixPHP

README 文档

README

A clean starting point for building applications with NixPHP — the minimal and flexible PHP microframework.

"As simple as possible, as flexible as necessary."

🚀 Installation

composer create-project nixphp/app my-app

Alternatively, clone the repo manually:

git clone https://github.com/nixphp/app my-app
cd my-app
composer install

Make sure your webserver points to the /public directory as document root.

🧰 Requirements

  • PHP 8.3+
  • Composer
  • A webserver (e.g. Apache, nginx, or PHP’s built-in server)

🗂️ Project Structure

/app
  /Controllers
  /Models
  /views
  config.php
  routes.php
/public
  index.php
bootstrap.php
composer.json
  • app/ contains your application logic
  • public/ is the webroot
  • bootstrap.php initializes the app
  • config.php holds your app configuration
  • routes.php contains all the routes

🛠️ First Steps

  1. Define your first route in app/routes.php:
route()->add('GET', '/', [App\Controllers\HomeController::class, 'index']);
  1. Create a controller in app/controllers/HomeController.php:
namespace App\Controllers;

use function NixPHP\render;

class HomeController
{
    public function index()
    {
        return render('home', ['name' => 'World']);
    }
}
  1. Create a view in app/views/home.phtml:
<?php use function NixPHP\s; ?>

<h1>Hello, <?= s($name) ?>!</h1>

📦 About NixPHP

This app skeleton is based on the NixPHP microframework.
It’s designed to give you a clean starting point — nothing more, nothing less.

To learn more about NixPHP and its philosophy, check out the main documentation.

🪪 License

MIT License. See LICENSE for details.

Ready to build something awesome?
Start hacking with NixPHP. 🚀

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-05-02