PHPackages                             bigeweb/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. bigeweb/framework

ActiveProject[Framework](/categories/framework)

bigeweb/framework
=================

This MVC framework provides a structured approach to developing web applications by separating the application's concerns into three distinct components: model, view, and controller. This separation of concerns promotes code organization, maintainability, and scalability, making it easier to manage and extend the application over time

1.4.7(1mo ago)068MITHTMLPHP &gt;=8.1

Since Oct 19Pushed 1mo agoCompare

[ Source](https://github.com/delyn112/bigeweb-framework)[ Packagist](https://packagist.org/packages/bigeweb/framework)[ RSS](/packages/bigeweb-framework/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (22)Versions (5)Used By (0)

1. [installation](#1-install-via-composer)
2. [start project](#2-start-local-server)
3. [view in browser](#3-open-in-browser)
4. [guide](#4-user-guide)
5. [models](#5-generating-models)
6. [requests](#6-generating-requests)
7. [providers](#7-working-with-providers)
8. [migrations](#8-migrations)
9. [modules or plugin](#9-modules)
10. [classes](#10-php-classes)
11. [fetch data](#11-fetch-data)
12. [insert and update](#12-insert-&-update)
13. [aggregates count](#13-aggregates-count)
14. [soft delete](#14-SoftDelete-eloquent)
15. [query flow](#15-query-flow)

🚀 Bigeweb MVC Framework
=======================

[](#-bigeweb-mvc-framework)

A lightweight PHP MVC framework built from scratch by **Bigeweb Solution**.
Designed for simplicity, flexibility, and learning core MVC concepts. Supports fluent query building, soft deletes, and database operations using PDO.

Features Fluent query builder (where, get, first, find) Insert &amp; update operations Soft delete support (withTrashed, onlyTrashed) Aggregate functions (count) Join support PDO-based secure queries
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#featuresfluent-query-builder-where-get-first-findinsert--update-operationssoft-delete-support-withtrashed-onlytrashedaggregate-functions-countjoin-supportpdo-based-secure-queries)

📌 Overview
----------

[](#-overview)

The **Model-View-Controller (MVC)** architecture is a design pattern used to separate application logic into three interconnected components:

- **Model** → Handles data and business logic
- **View** → Manages UI and presentation
- **Controller** → Processes input and connects Model + View

This separation improves:

- ✅ Code organization
- ✅ Maintainability
- ✅ Scalability

---

🧠 Architecture Diagram
----------------------

[](#-architecture-diagram)

[![MVC Architecture](https://camo.githubusercontent.com/33ab7c0d212a94fe8ecff9f52c0c327136b2ae95d2f878f855ba9eef447cbad9/68747470733a2f2f74616c656e743530302e636f6d2f626c6f672f77702d636f6e74656e742f75706c6f6164732f73697465732f34322f323032352f30392f696d6167652d31312e706e67)](https://camo.githubusercontent.com/33ab7c0d212a94fe8ecff9f52c0c327136b2ae95d2f878f855ba9eef447cbad9/68747470733a2f2f74616c656e743530302e636f6d2f626c6f672f77702d636f6e74656e742f75706c6f6164732f73697465732f34322f323032352f30392f696d6167652d31312e706e67)

---

⚙️ Core Features
----------------

[](#️-core-features)

- 🔀 **Routing System**

    - Clean and user-friendly URLs
    - Automatic route registration
- 🎨 **View Engine**

    - Render dynamic HTML content using blade file
    - Organized template structure
- 🧩 **Controllers**

    - Handle requests and application flow
- 🗄️ **Models**

    - Manage data and business logic
- 🧱 **Facades**

    - Simplify access to core components
- ⚡ **Lightweight &amp; Fast**

    - Built from scratch with minimal dependencies

---

📁 Project Structure
-------------------

[](#-project-structure)

project-root/ │ ├── app/ │ ├── Controllers/ │ ├── Models/ │ ├── resources/ │ ├── views/ │ ├── routes/ │ ├── public/ │ └── index.php │ ├── vendor/ └── composer.json

---

🛠️ Installation
---------------

[](#️-installation)

### 1. Install via Composer

[](#1-install-via-composer)

composer install bigeweb/framework

2. Start Local Server
---------------------

[](#2-start-local-server)

```
To start the local server. From your terminal navigate your directory to the root directory where you have composer
Then run

```

```
    php -S localhost:8000 -t public or php -S 127.0.0.1:8000 -t public
```

```
php -S means php serve with your prefer url followed by which port to be used
and you are referring the php to serve from public file.

```

\##This is only applicable in development mode, means xampp or any local server. For live production such as cPanel. You can point your domain to base folder such as public\_html Then use htaccess to redirect all incoming request to public\_html

3. Open in browser
------------------

[](#3-open-in-browser)

```
Open in your browser by copy and pasting the url generated from your terminal to the browser
```bash
http://localhost:8000 if you specify this or  http://127.0.0.1:8000

```

```

## 4. Usage Guide
🖼️ Working with Views
Navigate to the resources/views directory
Create or edit view files
Add HTML or dynamic content

🔀 Working with Routes
Create a new file in the routes/ directory
Define your routes
Routes are automatically registered
example of a route file can be found inside the route folder.

🎮 Working with Controllers

Add new controllers in:

app/Http/Controllers/
Handle logic and connect models + views
to create a new controller automatically, visit yoururl/ the command below in your browser
```bash
   make:controller/?UserController

```

where UserController is your controller class and file name. Change this to your class name following php class naming policy. example ProfileController. To learn more about php class naming policy, scroll down to naming policy paragraph

5. Generating Models
--------------------

[](#5-generating-models)

To automatically generate model to create a new model automatically, visit yoururl/ the command below in your browser

```
  make:model/?UserModel
```

where UserModel is your model class and file name. Change this to your preffered model file or class name following php class naming policy. example ProfileModel.

Example Model
-------------

[](#example-model)

```
class UserModel extends Model
{
    protected $table = 'users';

    protected $fillable = [
        'name',
        'email',
        'password'
    ];
}
```

6. Generating Request
---------------------

[](#6-generating-request)

To make a requests file for validation visit yoururl/ the command below in your browser

```
make:request/?CreateUserRequest
```

where CreateUserRequest is your request class and file name. Change this to your preffered request file or class name following php class naming policy. example CreateUserProfileRequest.

A request file is used for validating user import where you want the imput filed to be required. Example when create a new user account, of course you want the first and last name including the email. Request file can be used to mark this as important. You can view this in app\\Http\\Request directory.

7. Working with providers
-------------------------

[](#7-working-with-providers)

🧩 What is a Service Provider? A Service Provider is a class that is responsible for: 👉 Registering and setting up services (components) in your application Think of it as: 🔌 “The place where you plug in and configure features of your app” You can make use of the same logic as creating .

🧠 Simple analogy Imagine your app is a house: Services = electricity, water, internet Service Provider = the technician who installs and connects them Without it, nothing is properly set up.

⚙️ In an MVC / PHP framework A service provider usually does things like: Register routes Bind classes into a container Initialize components Configure dependencies

```
  class AppServiceProvider
{
    public function register()
    {
        // Register services
    }

    public function boot()
    {
        // Run after all services are registered
    }
}
```

1. register() Used to bind services or register services Example: database, logger, router example of route registration

```
 $this->loadUrlFrom(__DIR__.'/../../routes/web.php');
```

You can replace web.php with any file name and make sure the file exist And inside the file you can have the follow code

```
    name('home');

    Route::get('/hi', function(){
    //run the commands
    });
    ?>
```

More about this can be found in routes directory.

8. Migrations
-------------

[](#8-migrations)

To run a new migration file from your browser you can visit your product url/migration name

```
url/make:migration/?user
```

This will create a user migration file which will be store in database/migrations to run your migration call this command from your browser

```
url/migration
```

This will migrate your tables to database. Note: When you run migration multiple times, its not overwritten unless you manually delete the table and also remove the file name from migrations table. Then this will re-run with new changes made to the migration files.

This file come with some default prefill table such as id, timestamp which add created\_at and updated\_at to your table.

available usable schema columns are

```
Schema::create('table_name', function ($table){
              $table->id(); //automatically primary key and its auto increment
              $table->string('name')->nullable()->default('julie'); //nullable means the table can be empty without showing any error,
              //default length is 255, you can specify your own length by adding comma after the column name E.g name, 300
              $table->bigInt(string $name);
              $table->int(string $name);
              $table->text(string $name); This can be used to save long text.
              $table->json(string $name);
              $table->decimal(string $name, int $precision = 8, int $scale = 2);
              $table->float(string $name, int $precision = 8, int $scale = 2);
              $table->double(string $name, int $precision = 8, int $scale = 2);
              $table->boolean(string $name);
              $table->enum(string $name, array $allowed);
              $table->bigInt(string $name)->foreign(string $table, string $column = 'id'):
              $table->timestamps();
          });
```

To add delete query to foreign key simply add

```
onDelete(string $action)
```

and insert the action name such as cascade or set null You can also use on update function

```
onUpdate(string $action)
```

Other available joinable queries are

```
unique():
 default(mixed $value) //to set default values
 nullable(): // to allow empty columns
```

To learn more about migrations and table, we will update once we have our documentation ready

To drop a migration run

```
url/migration:rollback
```

More about database This project allows you to work with the database through the **Model**.
With the model, you can easily perform common database operations such as:

- **save** a new record
- **update** an existing record
- **create** a new record
- **create or update** a record
- **destroy** or delete a record

The model helps keep database logic clean and organized, so you do not need to write raw queries every time.

### Example

[](#example)

```
$user = new User();
$result = $user->save([
"name" = "John Doe";
"email"= "john@example.com"
]);
```

To fine a record

```
$user = User->find("id", "1"); or use
$user = User->findorfail("id", "1");
```

To update a record

```
$result = $user->update("1", [
"name" = "John Doe";
"email"= "john@example.com"
]);
```

or

```
$result = $user->updateOrcreate([
"name" = "John Doe";
"email"= "john@example.com"
], ["id" => 1]);
```

To delete a record

```
$user->destroy("id", "1");
```

9. Modules
----------

[](#9-modules)

To create extra packages like module create your directory example Packages/Plugins then navigate your terminal to the new directory and run

```
composer init
```

This will initialize a new project. fillup your project name and run next until done license can be MIT. And finally this will create a new src in your folder. src is same as app which is from base project And finally your directory can be like this. project-root/ │ ├── Packages/ |──── Plugins ├────── src │ ├── Controllers/ │ ├── Models/ │ ├────── resources/ │ ├── views/ │ ├── ────routes/

once this is done. Create a provider and register your routes, configs, views and migrations Note: to run migration in your package, add the below code to composer json psr4

```
Vendorname\\Packagename\\Database\\Migrations : database\\migration
```

vendor name is the name you enter during your composer init process.

And Finally, go to your composer and find repositories array, add your plugin path, path should follow same way you directory is.

Then run

```
composer require plugin vendor name / plugin name
```

example

```
composer require limahost/plugin
```

if you get an error about stable version run

```
composer require limahost/plugin:*
```

adding \* to your command means require any version.

Once this is done. And composer has complete adding the plugin. Navigate to base project config directory Find app.php open it and add your new service provider class. Great, Your plugin is ready for use and now connected to main project.

📈 Future Improvements ✅ Middleware support ✅ Authentication system ✅ API support 🔄 More documentation

10. Php Classes
---------------

[](#10-php-classes)

\##PHP OOP Classes and Objects A class is a template for objects, and it defines the structure (properties) and behavior (methods) of an object. An object is an individual instance of a class. A class is defined with the class keyword, followed by the name of the class and a pair of curly braces ({}). All its properties and methods go inside the braces. Assume we create a class named Fruit. The Fruit class can have properties like name and color. In addition, the Fruit class has two methods for setting and getting the details:

```
name = $name;
    $this->color = $color;
  }

  // Method to display the properties
  function get_details() {
    echo "Name: " . $this->name . ". Color: " . $this->color .".";
  }
}
?>
```

To learn more about this visit [php class lesson](https://www.w3schools.com/php/php_oop_classes_objects.asp)

11. Fetch Data
--------------

[](#11-fetch-data)

### Get all records

[](#get-all-records)

```
$users = UserModel::get();
```

### Where clause

[](#where-clause)

```
$users = UserModel::where('name', '=', 'John')->get();
```

### First result

[](#first-result)

```
$user = UserModel::where('email', '=', 'john@example.com')->first();
```

### Find by ID

[](#find-by-id)

```
$user = UserModel::find(1);
```

12. Insert &amp; Update
-----------------------

[](#12-insert--update)

Insert &amp; Update
-------------------

[](#insert--update)

### Insert

[](#insert)

```
$user = UserModel::save([
    'name' => 'John',
    'email' => 'john@example.com'
]);
```

### Update

[](#update)

```
$user = UserModel::update(1, [
    'name' => 'John Updated'
]);
```

13. Aggregates count
--------------------

[](#13-aggregates-count)

### Count records

[](#count-records)

```
$totalUsers = UserModel::count();

$activeUsers = UserModel::where('status', '=', 'active')->count();
```

Internally, this generates:

```
SELECT COUNT(*) as total FROM users WHERE status = 'active'
```

14. SoftDelete Eloquent
-----------------------

[](#14-softdelete-eloquent)

🗑️ Soft Deletes The framework supports soft deletes, allowing records to be "deleted" without being permanently removed from the database. Instead of deleting the record, a deleted\_at timestamp is set. This makes it possible to restore the record later.

To use soft deletes in your table, you must add a deleted\_at column. You can do this in two ways:

Option 1: Using the blueprint helper

```
$table->softDeletes();
```

Option 2: Manually adding the column

```
$table->dateTime('deleted_at')->nullable();
```

Soft deletes allow records to be marked as deleted without removing them from the database.

### Default behavior

[](#default-behavior)

Only non-deleted records are returned:

```
UserModel::get();
```

### Include deleted records

[](#include-deleted-records)

```
UserModel::withTrashed()->get();
```

### Only deleted records

[](#only-deleted-records)

```
UserModel::onlyTrashed()->get();
```

### How it works

[](#how-it-works)

The query builder automatically adds:

```
WHERE deleted_at IS NULL
```

or

```
WHERE deleted_at IS NOT NULL
```

⚙️ How It Works When a record is deleted → deleted\_at is set to current timestamp When not deleted → deleted\_at is NULL Queries automatically ignore soft deleted records (if enabled) 🧩 Usage in Model

To enable soft delete behavior in your model:

use SoftDeletes;

```
class User extends Model
{
use SoftDeletes;
}
🔄 Available Methods
$user->delete();        // Soft delete
$user->restore();       // Restore record
$user->forceDelete();   // Permanent delete
```

15. Query Flow
--------------

[](#15-query-flow)

1. Static call is made:

```
UserModel::where('name', '=', 'John')->get();
```

2. `__callStatic()` intercepts the call and forwards it:

```
static::query()->where(...)
```

3. `query()` creates a new `EloquentQueryBuilder` instance:

```
new EloquentQueryBuilder(new UserModel())
```

4. Query is built step-by-step:

- SELECT clause
- JOIN clauses
- WHERE conditions
- LIMIT

5. Query is executed using PDO.
6. Results are returned as objects.

Notes
-----

[](#notes)

- Always define `$fillable` to protect against mass assignment.
- Use `count()` instead of `get()` when only counting records.
- Use `first()` when expecting a single result.
- Query builder resets automatically after execution.

🤝 Contributing

Contributions are welcome!

Fork the project Create your feature branch Submit a pull request

📄 License

This project is open-source and available under the MIT License.

👨‍💻 Author

Bigeweb Solution Built with ❤️ using PHP

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance92

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~56 days

Total

4

Last Release

41d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4e392a661e44128030b993416b127893f54b3623fd4332c29c785c2f36d14913?d=identicon)[delyn112](/maintainers/delyn112)

---

Top Contributors

[![delyn112](https://avatars.githubusercontent.com/u/81871957?v=4)](https://github.com/delyn112 "delyn112 (3 commits)")

### Embed Badge

![Health badge](/badges/bigeweb-framework/health.svg)

```
[![Health](https://phpackages.com/badges/bigeweb-framework/health.svg)](https://phpackages.com/packages/bigeweb-framework)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
