PHPackages                             chandan07cse/elham - 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. [CLI &amp; Console](/categories/cli)
4. /
5. chandan07cse/elham

ActiveProject[CLI &amp; Console](/categories/cli)

chandan07cse/elham
==================

Inspiring You The Next - A Product Of UROSD Lab

v1.0.0(9y ago)121564MITJavaScript

Since Aug 10Pushed 9y ago2 watchersCompare

[ Source](https://github.com/chandan07cse/Elham)[ Packagist](https://packagist.org/packages/chandan07cse/elham)[ RSS](/packages/chandan07cse-elham/feed)WikiDiscussions development Synced 4w ago

READMEChangelog (1)Dependencies (12)Versions (4)Used By (0)

Elham - Inspiring You The Next - A Product Of UROSD Lab
=======================================================

[](#elham---inspiring-you-the-next---a-product-of-urosd-lab)

📢 Let's build together by not reinventing the wheel but assembling the wheels to reinvent a new 🚀

### 🔰 Version 1.0.0

[](#beginner-version-100)

### 🐾 Installation

[](#feet-installation)

🔹 First install composer globally(if you don't have it) by running the following commands
For Ubuntu

```
 curl -sS https://getcomposer.org/installer | php && sudo mv composer.phar /usr/local/bin/composer
```

For Cent OS

```
 curl -sS https://getcomposer.org/installer | php && chmod +x composer.phar && sudo mv composer.phar /usr/local/bin/composer
```

🔹 Then install Elham by the following command(for latest stable releases)

```
 composer create-project chandan07cse/elham YOUR_PROJECT_NAME
```

🔹 But if you want Elham from its master branch, then you could certainly type it

```
 composer create-project chandan07cse/elham=dev-master YOUR_PROJECT_NAME
```

🔹 Now cd into your\_project\_name/public &amp; run by the php command

```
 cd YOUR_PROJECT_NAME/public
 php -S localhost:8000
```

🔹 Note : For the rest of the project we'll run each &amp; every command from the project directory. For that

```
 cd ../
```

📦 Dependencies
==============

[](#package-dependencies)

🔹 To check the list of dependencies Elham relies, run the command

```
 composer info
```

🔦 Visual Dependencies
=====================

[](#flashlight-visual-dependencies)

- To check the visual dependencies, please go to the link [Visual Dependecies](https://www.versioneye.com/php/chandan07cse:elham/1.0.0/visual_dependencies)

🎹 Elham Command Alias
=====================

[](#musical_keyboard-elham-command-alias)

🔹 Let's run the below command to run elham command if you are in Linux

```
 echo "alias elham='./elham'" >> ~/.bash_aliases && source ~/.bash_aliases
```

🔹 But if you are in windows machine add the executibles in your path. If you are using [Laragon](https://laragon.org) then it can be

```
 C:\laragon\www\project_name\vendor\bin\;C:\laragon\www\project_name\;
```

🔹 Now you can run elham command through out your project. To check run from the terminal if you are in linux enviornment

```
 elham
```

🔹 But if you are in windows, then

```
 php elham
```

🎻 Build Controller Through CLI
==============================

[](#violin-build-controller-through-cli)

🔹 Elham provides you the build:controller command

```
 elham build:controller YourController
```

🔹 Check it by finding it in app/Controller directory of your project.

🔹 By default elham generates resourceful controller. But if you want you can always make a plain controller by running

```
 elham build:controller YourController plain
```

🎸 Build Model Through CLI
=========================

[](#guitar-build-model-through-cli)

🔹 Elham also provides you build:model command

```
 elham build:model YourModel
```

🔹 It'll create a model with necessary properties &amp; methods based on your database table.

🎷 Build Form Through CLI
========================

[](#saxophone-build-form-through-cli)

🔹 Elham ships with build:form command

```
 elham build:form YourForm
```

🔹 A dummy blade form will be generated inside app/Views/\_partials directory.

🎼 Build Validator Through CLI
=============================

[](#musical_score-build-validator-through-cli)

🔹 Elham also provides you build:validator command

```
 elham build:validator YourValidator
```

🔹 A validation class will be generated inside app/Validation directory.

🎤 Help keyword for CLI generators
=================================

[](#microphone-help-keyword-for-cli-generators)

🔹 Now if you need any help just type

```
 elham help build:keyword
```

🔹 All the commands check the existing ones as well for simplicity.

👔 👗 Elham Templating Engines
============================

[](#necktie-dress-elham-templating-engines)

🔹 Elham ships with Blade and Plain view for rendering its View. But if you want you can use twig too. For that you will need to install [TWIG](http://twig.sensiolabs.org/) by the following command

```
 composer require twig/twig
```

🌴 🌱 Elham Migrations &amp; Seeding
==================================

[](#palm_tree-seedling-elham-migrations--seeding)

🔹 As Elham used [Phinx](https://phinx.org/) for migrations &amp; seeding, so to use phinx command just run from the terminal

```
 echo "alias phinx='./phinx'" >> ~/.bash_aliases && source ~/.bash_aliases
```

🔹 Now you'll be able to run phinx command. To make sure phinx running correctly, run in terminal

```
 phinx
```

🔹 You'll get the list of [Phinx](https://phinx.org/) command. To use phinx, first initialize it by the following command

```
 phinx init
```

🔹 A phinx.yml file will be generated. You need to customize it. Sample customization for development listed below

```
 environments:
 default_database: development
 development:
          adapter: sqlite
          host: localhost
          name: db/database.sqlite
          user: root
          pass: ''
          port: 3306
          charset: utf8
```

🔹 Phinx uses 🐫 CamelCase for its functioning &amp; it'll store the migrations &amp; seeding inside db/migration &amp; db/seeds directory respectively. So if you wanna create a migration for Students table, just run in terminal

```
 phinx create Students
```

🔹 A new unique migration for Students will be generated inside db/migrations directory of Elham like below

```
 use Phinx\Migration\AbstractMigration;
 class Students extends AbstractMigration
  {
       public function change()
       {

       }
   }
```

🔹 Now we not gonna use the change method for the migration. Beside we'll create two methods up() &amp; down() for our migration &amp; rollback. So for that we gonna code a bit something like below. Say we've our student table consisting with roll &amp; name.

```
 use Phinx\Migration\AbstractMigration;
 class Students extends AbstractMigration
  {
       public function up()
       {
            $students = $this->table('students');
            $students->addColumn('name','string',['length'=>100])
                     ->addColumn('roll','string')
                     ->create();
       }
       public function down()
       {
           $this->dropTable('students');
       }

   }
```

🔹 Now to migrate, run from terminal

```
   phinx migrate
```

🔹 It'll affect our default db/databse.sqlite hopefully. Now to rollback, just run from terminal

```
 phinx rollback
```

🔹 To explore more about Phinx, please read the 🔗[documentation](http://docs.phinx.org/en/latest/).

🔹 Now for seeding, we just need to create the seeder class from the cli. Say, we need to create a UserSeeder to seed some datumn into users table. To create the UserSeeder class

```
 phinx seed:create UserSeeder
```

🔹 We'll get the UserSeeder class inside db/seeds directory. Inside there, we'll get

```
  'chandan07cse',
              'password' => md5('me'),
              'email' => 'freak.arian@gmail.com',
              'image' => 'public/images/chandan07cse.jpg',
              'activation_code' => md5(rand(0,1000)),
              'active' => 1
          ),
          array(
              'username'    => 'mamun10pgd',
              'password' => md5('mamun10pgd@!'),
              'email' => 'rajmamunet@gmail.com',
              'image' => 'public/images/mamun10pgd.jpg',
              'activation_code' => md5(rand(0,1000)),
              'active' => 0
          )
      );

       $this->insert('users', $data);
    }
 }
```

🔹 Now run from terminal

```
phinx seed:run
```

🔹 If you wanna run a specific class then run

```
phinx seed:run -s UserSeeder
```

🔹 For faker seeding, we can write something like this in UserSeeder class

```
 $faker->userName,
             'password'      => md5($faker->password),
             'email'      => $faker->email,
             'image'      => $faker->image($dir = 'public/images',$width = 640, $height = 480),
             'activation_code'=> $faker->randomElement(),
             'active'      => $faker->boolean

         ];
     }

     $this->insert('users', $data);

    }
}
```

⚽🏀🏈⚾🎾 Elham Playground
======================

[](#soccerbasketballfootballbaseballtennis-elham-playground)

🔹 Elham also uses [Psyshell](http://psysh.org/) for tinkering with its functionalities, so to use psysh command just run from the terminal

```
 echo "alias psysh='./psysh'" >> ~/.bash_aliases && source ~/.bash_aliases
```

🔹 Now if you wanna tinkering with psyshell just run in terminal

```
 psysh
```

🔹 You'll be into the Psyshell now. If you wanna start toying around then first initialize the proper environment. To init the environment, run in terminal

```
 $environment = new Dotenv\Dotenv(__DIR__);
 $environment->load();
```

🔹 To init the database with eloquent, run in terminal

```
 $db = new config\Database;
```

🔹 Now if you wanna query through Eloquent/Query Builder, create an instance of the Capsule

```
 $db->eloquent();
```

🔹 Now if you wanna play with User model, create an object of User by running in terminal

```
 $user = new Elham\Model\User;
```

🔹 To get all data from User model, just run in terminal

```
 $user->all()->toArray();
```

🔹 And if you wanna query through PDO, create an instance of the PDO

```
 $pdo = $db->pdo();
```

🔹 If you wanna insert some data into users table using pdo, do the following

```
  $pdo =  $pdo->prepare("insert into users values(:id,:username,:email,:password,:image,:activation_code,:active)");
  $pdo->execute([':id'=>null,':username'=>'moin07cse',':password'=>'hjkkjhkjjk',':image'=>'moin.png',':activation_code'=>'dfsf',':active'=>0]);
  $pdo->fetchAll(PDO::FETCH_ASSOC);
```

🔹 You can run every bit of eloquent &amp; pdo queries along with other functionalities through [Psyshell](http://psysh.org/).

📲 Elham API Call
================

[](#calling-elham-api-call)

🔹 Elham uses [Unirest](http://unirest.io/php.html) libraries for its api calling. Its pretty easy to call an api using the Elham's api method like below

```
        $uri = 'http://mockbin.com/request';
        $content_type = 'application/json';
        $request_parameter = ['foo' => 'hello', 'bar' => 'world'];
        $request_type = 'post';
        $api_response = $this->api($uri,$content_type,$request_parameter,$request_type);
```

🔍 Elham Vulnerability Scan
==========================

[](#mag-elham-vulnerability-scan)

🔹 To check any vulnerable package issue in Elham, just run the following command

```
 elham check:vulnerability
```

🏡 Elham Frontend Housekeeping
=============================

[](#house_with_garden-elham-frontend-housekeeping)

🔹 Elham uses [Gulp](http://gulpjs.com/) for basic front-end housekeeping of tasks like minifying css,js, autoprefixing of css and so on &amp; so forth. To use gulp, first install node js by the following command

```
 sudo apt-get install npm
```

🔹 After that we need to install gulp globaly by the following command in ubuntu.

```
 sudo npm install -g gulp
```

🔹 But if you are in windows then in [Laragon](https://laragon.org) terminal type

```
  npm install -g gulp
```

🔹 As pacakge.json already ships with Elham. So you don't have to create it. To install gulp just run the following command

```
 sudo npm install gulp --save-dev
```

🔹 But if you are in windows, then run

```
 npm install gulp --save-dev
```

🔹 The way Gulp work is - Everything is split into various plugins. So each plugin does one job &amp; one job only. And that way we can pipe the output of one function to another. So we can say - Let's autoprefix this file &amp; then minify it &amp; then output it some file &amp; then finally provide some sort of notifications. All of that stuff is really easy with Gulp.

🔹 So if we want to use plugins, we need to install some. Lets install, just to get started, How about minifying our css We can do that by running into ubuntu terminal

```
 sudo npm install gulp-clean-css --save-dev
```

🔹 For windows run

```
 npm install gulp-clean-css --save-dev
```

🔹 Now if you wanna minifying the js then in ubuntu terminal

```
sudo npm install gulp-jsmin --save-dev
```

🔹 But if you are in windows then run in [Laragon](https://laragon.org) terminal

```
 npm install gulp-jsmin --save-dev
```

🔹 To use gulp, run from terminal

```
 gulp
```

🍓 Elham Zero Second Deployment
==============================

[](#strawberry-elham-zero-second-deployment)

🔹 Elham proudly compatibles with [ngrok](https://ngrok.com/). So you can deploy it less than a second. For that you'll have to install node &amp; nodejs-legacy by the following command

```
 sudo apt-get install node
 sudo apt install nodejs-legacy
```

🔹 After that we gonna install ngrok through (npm)node package manager globally

```
 sudo npm install ngrok -g
```

🔹 Now we gonna deploy our project by just running the following command

```
 ngrok http 8000
```

🔹 Make sure you are running your project through port 8000. If you are using other port, then use that port to ngrok

🍇 Elham Production Deployment
=============================

[](#grapes-elham-production-deployment)

🔹 Don't worry it also supports any repo(Github,Gitlab,Bitbucket....) and any CI (Jenkins) and any server(Linux Distro. preferred) in deployment.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

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

Unknown

Total

1

Last Release

3321d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6237823?v=4)[Md. Ainul Moin Noor](/maintainers/chandan07cse)[@chandan07cse](https://github.com/chandan07cse)

---

Top Contributors

[![chandan07cse](https://avatars.githubusercontent.com/u/6237823?v=4)](https://github.com/chandan07cse "chandan07cse (285 commits)")

---

Tags

clielham-commandfaker-seedgulppdophinxElhamCustom OOP frameworkCustom MVC frameworkStartup MVC

### Embed Badge

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

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k532.1M19.4k](/packages/laravel-framework)[symfony/framework-bundle

Provides a tight integration between Symfony components and the Symfony full-stack framework

3.6k246.0M11.1k](/packages/symfony-framework-bundle)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19664.8M1.6k](/packages/drupal-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6941.5M396](/packages/drupal-core-recommended)[illuminate/routing

The Illuminate Routing package.

1239.0M2.9k](/packages/illuminate-routing)

PHPackages © 2026

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