PHPackages                             naqla-sehia/naqla-framework - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. naqla-sehia/naqla-framework

ActiveLibrary[Framework](/categories/framework)

naqla-sehia/naqla-framework
===========================

A micro framework used by Naqla Sehia development team for PHP Back-end projects

v1.1.0(2mo ago)01MITPHPPHP ^8.0

Since May 25Pushed 2mo agoCompare

[ Source](https://github.com/fareskhalid/naqla-framework-package)[ Packagist](https://packagist.org/packages/naqla-sehia/naqla-framework)[ RSS](/packages/naqla-sehia-naqla-framework/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (4)Versions (3)Used By (0)

Naqla Sehia PHP Micro Framework
===============================

[](#naqla-sehia-php-micro-framework)

A lightweight, modern PHP micro-framework designed for building web applications with clean architecture and minimal overhead.

Features
--------

[](#features)

- **Modern PHP 8.0+** with typed properties and return types
- **Routing** - Simple and clean route definition with GET/POST methods
- **Request/Response** - Elegant HTTP request and response handling
- **Validation** - Built-in validation system with extensible rules
- **Database Abstraction** - Support for MySQL and SQLite with query builder
- **Session Management** - Flash message support and session handling
- **View Rendering** - Template support with layout inheritance
- **Helper Functions** - Convenient global helper functions
- **Configuration Management** - Environment-based configuration system
- **PDO-based Database** - Safe prepared statement execution
- **Error Handling** - Proper exception handling and HTTP status codes

Installation
------------

[](#installation)

Install via Composer:

```
composer require naqla-sehia/naqla-framework
```

Quick Start
-----------

[](#quick-start)

### Project Structure

[](#project-structure)

Your project should follow this structure:

```
app/
├── Models/
│   └── User.php
├── Controllers/
│   └── UserController.php
routes/
├── web.php
public/
├── index.php
├── css/
└── js/
database/
├── migrations/
└── database.sqlite
config/
├── app.php
├── database.php
└── mail.php
views/
├── layouts/
│   └── main.php
├── dashboard.php
└── errors/
    └── 404.php
vendor/
.env

```

### Setup .env

[](#setup-env)

Create a `.env` file in your project root:

```
DB_DRIVER=mysql
DB_HOST=localhost
DB_USERNAME=root
DB_PASSWORD=
DB_DATABASE=naqla_framework

APP_NAME=MyApp
APP_DEBUG=true
```

### Create Entry Point (public/index.php)

[](#create-entry-point-publicindexphp)

```
