nigaphp/niga
最新稳定版本:v1.6.6
Composer 安装命令:
composer create-project nigaphp/niga
包简介
Niga framework
关键字:
README 文档
README
NigaPHP is a lightweight PHP web application framework designed to simplify and accelerate the development process for PHP developers. Initially created by Abass Dev, it is now maintained and contributed to by a community of developers.
Badges
Prerequisites
- PHP >= 8.0
- Composer >= 2.0
- PDO
- XML
- ZIP
- MBSTRING
Note: The Niga framework is not yet production-ready.
Documentation
Getting Started
Installation
composer create-project nigaphp/niga site_name
Development Server
Change to your new website directory:
cd my-website
niga run:dev
Default values:
- HOST: localhost
- PORT: 8000
- PUBLIC_PATH: public
Modify these in %APP_ROOT%/config/app.json
Access your site at http://localhost:8000/
Creating a Controller
niga make:controller HomeController
This creates:
src/Controller/HomeController.php
<?php namespace App\Controller; use Niga\Framework\Controller\AbstractController; use Niga\Framework\Attributes\Route; class HomeController extends AbstractController { #[Route('/home', name:'home', method:'get')] public function home() { return $this->render("home", [ "name" => "home" ]); } }
views/home.php
<?php if ($cName && $cPath) : ?> <h3>Hello <span class='be-color-py be-code'><?= $cName ?></span></h3> <p>Your <span class='be-color-py be-code'><?= $cName ?></span> class is located at <span class='be-color-py be-code'><?= $cPath ?></span>!</p> <?php endif ?>
Contact
For contributions or bug reports, contact:
License
[View License](https://github.com/nigaphp/niga/blob/master/LICENSE
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 28
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-01-24
