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.
- PHP >= 8.0
- Composer >= 2.0
- PDO
- XML
- ZIP
- MBSTRING
Note: The Niga framework is not yet production-ready.
composer create-project nigaphp/niga site_nameChange to your new website directory:
cd my-website
niga run:devDefault values:
- HOST: localhost
- PORT: 8000
- PUBLIC_PATH: public
Modify these in %APP_ROOT%/config/app.json
Access your site at http://localhost:8000/
niga make:controller HomeControllerThis 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 ?>For contributions or bug reports, contact:
[View License](https://github.com/nigaphp/niga/blob/master/LICENSE
