NigaPHP is a lightweight PHP web application framework designed to simplify and speed up the development process for PHP developers. It was initially created by Abass Dev and has since been maintained and contributed to by a community of developers. With its user-friendly interface and powerful features, NigaPHP has become a popular choice for building scalable and secure web applications.
- PHP => 8.0
- PHP Composer => 2.0
- PDO
- XML
- ZIP
- MBSTRING
Note: Niga framework is not ready for production application yet.
Let's discover NigaPHP Framework in 5 minutes.
Get started by creating a new Website.
composer create-project nigaphp/niga site_name
You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.
The command also installs all necessary dependencies you need to run NigaPHP.
Change directory to your new website my-website
cd my-website
niga run:dev
Default values [HOST=localhost, PORT=8000, PUBLIC_PATH=public] you can change this in the config file %APP_ROOT%/config/app.json
Then open the this link in your web browser http://localhost:8000/.
niga make:controller HomeController
In this situation, we are creating a controller for the home page.
This command will create two new files for us.
src/Controler/HomeController.php
Here is your new controller class.
<?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
And this is the view to rendered.
<?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 ?>
If you want to contribute to this famous framework or if you found any bug, Please contact us on [email protected] / [email protected] / [email protected]