Skip to content
forked from nigaphp/niga

Nigatedev PHP framework for saving time

License

Notifications You must be signed in to change notification settings

todaydevs/nigatedev

 
 

Repository files navigation

NigateDev framework

Nigatedev is a time-saving PHP framework coded by Abass Ben Cheik and contributors

GitHub pull requests Issues

Nigatedev

Prerequisites

"php": "^7.4|^8.0",
"ext-pdo_mysql": "*",
"ext-pdo_pgsql": "*",
"ext-pdo_sqlite": "*",
"composer": "^2.0"

Note: Nigatedev framework is not ready for production application at this time.

Installation

$ composer create-project nigatedev/nigatedev site_name

Basic usage

It is strongly recommend to use composer to install Nigatedev framework from packagist instead of cloning this repository, if you want to become a contributor please contact abass@todaydevs.com

If you already have composer installed you can use the following command to create your web application with Nigatedev framework.

$ composer create-project nigatedev/nigatedev site_name

This command will create a web application in the site_name directory on your machine. For a complete documentation, have a look at Nigatedev Docs.

Controller

Create a controller using (Nigatedev Console Maker)

1. default example
$ bin/niga make:controller HomeController
2. shortcut example
$ bin/niga m:c HomeController

What happens after creating a controller using the nigatedev console?

1. src/Controller/HomeController.php # Create controller class
2. views/home.php # Create the file views/home.php or views/home.twig depending on the chosen template engine twig|diyan, by default diyan is used !
3. config/loader.php # Update controllers loader

Entity

Create an entity using (Nigatedev Console Maker)

1. default example
$ bin/niga make:entity ProductEntity
2. shortcut example
$ bin/niga m:e ProductEntity

Then following the instructions.

What happens after creating an entity using the nigatedev console? It will only generate one file for you

1. src/Entity/ProductEntity.php # The entity class

Routing

<?php
namespace App\Controller;

use Nigatedev\FrameworkBundle\Controller\Controller;
use Nigatedev\FrameworkBundle\Http\Request;
use Nigatedev\FrameworkBundle\Attributes\Route;

class SiteController extends AbstractController
{
    #[Route('/', name:'home', method:'get')]
    public function home() {
        return $this->render("home", [
            "name" => "home"
        ]);
    }

    #[Route('/contact', name:'contact', method:'get|post')]
    public function contact(Request $request) {
        return $this->render("contact", [
            "name" => "contact"
        ]);
    }
}

Contact

If you want to contribute to this famous framework or if you found any bug, Please contact us here abasslab0@gmail.com / nigatedev@gmail.com

About

Nigatedev PHP framework for saving time

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • PHP 64.1%
  • JavaScript 13.9%
  • Shell 7.4%
  • Twig 6.3%
  • SCSS 5.4%
  • CSS 2.9%