nigaphp / niga
Niga framework
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 26
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: 2024-12-26 00:58:01 UTC
README
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.
Prerequisites
- PHP => 8.0
- PHP Composer => 2.0
- PDO
- XML
- ZIP
- MBSTRING
Note: Niga framework is not ready for production application yet.
Take a look at the documentation website
Getting Started
Let's discover NigaPHP Framework in 5 minutes.
Get started by creating a new Website.
Installation
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.
Development server
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/.
Create a controller
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 ?>
Contact us
If you want to contribute to this famous framework or if you found any bug, Please contact us on abass@abassdev.com / nigaphp@gmail.com / abassthedev@gmail.com