nigaphp / niga
Niga framework
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 28
Watchers: 1
Forks: 4
Open Issues: 2
Type:project
Requires
- php: ^7.4|^8.0
- nigatedev/framework-bundle: ^v1.0
Requires (Dev)
- fakerphp/faker: ^1.15
- filp/whoops: ^2.14
- phpstan/phpstan: ^0.12.94
- phpunit/phpunit: ^9.5
This package is not auto-updated.
Last update: 2025-03-06 01:47:24 UTC
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