nigaphp/niga

Niga framework

Maintainers

Details

github.com/nigaphp/niga

Source

Issues

Installs: 13

Dependents: 0

Suggesters: 0

Security: 0

Stars: 28

Watchers: 1

Forks: 4

Open Issues: 2

Type:project

v1.6.6 2022-02-17 14:26 UTC

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

Packagist Version License Pull Requests Issues

Niga Logo

Prerequisites

  • PHP >= 8.0
  • Composer >= 2.0
  • PDO
  • XML
  • ZIP
  • MBSTRING

Note: The Niga framework is not yet production-ready.

Documentation

View Documentation Website

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:

  1. 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"
        ]);
    }
}
  1. 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