PHPackages                             baiseiit/baiseiit - 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. baiseiit/baiseiit

ActiveProject[Framework](/categories/framework)

baiseiit/baiseiit
=================

The Baiseiit framework

v1.0.2(5y ago)191402MITPHPPHP ^7.0.10|^8.0

Since Oct 21Pushed 5y ago2 watchersCompare

[ Source](https://github.com/baiseiit/baiseiit)[ Packagist](https://packagist.org/packages/baiseiit/baiseiit)[ RSS](/packages/baiseiit-baiseiit/feed)WikiDiscussions master Synced today

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

Baiseiit Framework
==================

[](#baiseiit-framework)

[![](https://raw.githubusercontent.com/baiseiit/baiseiit/master/storage/favicon.png)](https://raw.githubusercontent.com/baiseiit/baiseiit/master/storage/favicon.png)

Baiseiit is a PHP framework based on mvc. Baiseiit contains many useful features and helps web developers create applications faster. Unlike other frameworks, you can directly change the framework code without losing it. Source code in the framework directory.

> The minimum PHP version must be 7.0.10

Install
=======

[](#install)

1. Install Composer ()
2. Install the package via composer:

```
composer create-project --prefer-dist baiseiit/baiseiit blog
```

Open config/app.php file and establish a database connection. DB\_CONNECTION only supports MySQL and Postgresql.

```
define('DB_CONNECTION', 'mysql');
define('DB_HOST', '127.0.0.1');
define('DB_USER', 'root');
define('DB_PASS', '');
define('DB_NAME', 'baiseiit');
```

Connecting a database to PostgreSQL:

```
define('DB_CONNECTION', 'pgsql');
```

Start the server

> Run the command on the command line in the project's base folder

```
php artisan run
```

Documentation
=============

[](#documentation)

Artisan
-------

[](#artisan)

Artisan provides many useful commands and speeds up development time.

> Run the command on the command line in the project's base folder

```
php artisan help
```

Route
-----

[](#route)

There are two types of routing: web (routes/web.php) and api (routes/api.php). Use the web if your app doesn't have the integration API, otherwise use the api.

### Web

[](#web)

```
Route::get('/', function($request) {
	(new HomeController)->example($request);
})
```

### Api

[](#api)

```
Route::get('/', function($request) {
    Response::json([
        'success' => true
    ], 200);
});
```

---

#### Supported Http methods

[](#supported-http-methods)

```
Route::get('/', function($request) {});
Route::post('/', function($request) {});
Route::put('/', function($request) {});
Route::delete('/', function($request) {});
Route::patch('/', function($request) {});
```

#### Dynamic url

[](#dynamic-url)

To get a dynamic url resource, we use $request-&gt;query\[$name\]. For example, we need to get a specific user.

- @ specifies that this is a dynamic resource
- $request-&gt;query\['id'\] returns the value @id

```
Route::get('/users/@id', function($request) {
	Response::json([
	    'id' => $request->query['id']
	], 200);
});
```

Controller
----------

[](#controller)

Creates a controller in the app/Controllers directory

```
php artisan create Controller HomeController
```

Sets the variable to view

```
$this->view->set('title', 'Baiseiit');
```

Return view

```
$this->view->render('home');
```

Model
-----

[](#model)

Creates a model in the app/Models directory

```
php artisan create Model User
```

Set table

```
class User extends Model {
    const TABLE = 'users';
}
```

View
----

[](#view)

Creates a view in the client/Views directory

```
php artisan create View home
```

We use the Smarty template for views. See the Smarty documentation ()

```
{$title}
```

ORM
---

[](#orm)

We use the RedBean ORM. See the RedBean documentation ()

> We replaced the Redbean R class with Db

```
use App\Models\User;

class HomeController extends Controller {

    public function example($request) {

        $users = Db::findAll(User::TABLE);

        $this->view->set('users', $users);
        $this->view->render('home');
  }
}
```

Middleware
----------

[](#middleware)

Creates a middleware in the app/Middleware directory

```
php artisan create Middleware TestMiddleware
```

The handle method automatically calls.

```
class TestMiddleware extends Middleware {

    public static function handle($request, \Closure $next) {

        $id = $request->params['id'];

        if ($id > 10) {
            return self::redirect('home', [
              'title' => '404 error'
            ]);
        } else {
            return $next($request);
        }
    }
}
```

If the check fails you can redirect to error view.

```
return self::redirect($view, [$params]);
```

If everything is OK, you must return $next($request);

```
return $next($request);
```

Then register the middleware to route:

```
Route::get('/', function($request) {
	(new HomeController)->example($request);
})->middleware(TestMiddleware::class);
```

CORS
----

[](#cors)

To configure cors go to the folder config/cors.php.

```
define('ALLOW_ORIGIN', '*');
define('ALLOW_METHODS', '*');
define('ALLOW_HEADERS', '*');
define('MAX_AGE', 3600);
```

Storage
-------

[](#storage)

You can save all files in the storage folder. The command below returns the path to store the file:

```
Filesystem::storage('/')
```

You can create a symbolic link of the Storage.

> If you are using Windows run this command as an administrator

```
php artisan storage link
```

The storage shortcut is created in the client/assets directory.

Assets
------

[](#assets)

You can get the client/assets file using the following command:

```
Filesystem::assets('/')
```

Deployment
----------

[](#deployment)

You must add the project to the www-data group, and then set the permission to the framework/src/CompiledViews directory.

```
sudo chown -R www-data:www-data blog
sudo chmod -R 777 framework/src/CompiledViews
```

### Nginx configuration

[](#nginx-configuration)

```
server {
    listen 80;
    listen [::]:80;
    root /var/www/example;
    index index.php;
    server_name example.com;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php7.4-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }

    location ~ /\.ht {
        deny all;
    }
}
```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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 ~64 days

Total

3

Last Release

1951d ago

PHP version history (2 changes)1.0PHP ^7.0.10

v1.0.2PHP ^7.0.10|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d8edafc9738e7661c962d9d816904484f5823773c201bb663a38c9b2849d357?d=identicon)[Alibek](/maintainers/Alibek)

---

Top Contributors

[![baiseiit](https://avatars.githubusercontent.com/u/71123014?v=4)](https://github.com/baiseiit "baiseiit (37 commits)")

### Embed Badge

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

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

###  Alternatives

[prestashop/prestashop

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

9.1k16.8k](/packages/prestashop-prestashop)[yiisoft/yii2-smarty

The Smarty integration for the Yii framework

74383.1k16](/packages/yiisoft-yii2-smarty)[sintattica/atk

ATK business framework

4521.7k3](/packages/sintattica-atk)[bearsaturday/bearsaturday

BEAR.Saturday framework

2056.7k1](/packages/bearsaturday-bearsaturday)[mathmarques/smarty-view

Slim Framework 4 view helper built on top of the Smarty templating component

24136.7k1](/packages/mathmarques-smarty-view)

PHPackages © 2026

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