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 giant.

Version

1.0.0

Installation

$ curl -sS https://getcomposer.org/installer | php && sudo mv composer.phar /usr/local/bin/composer
$ composer create-project chandan07cse/elham YOUR_PROJECT_NAME
$ composer create-project chandan07cse/elham=dev-master YOUR_PROJECT_NAME
$ cd YOUR_PROJECT_NAME/public
$ php -S localhost:8000
$ cd ../

Dependencies

$ composer info

Elham Command Alias

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

Build Controller Through CLI

$ elham build:controller YourController
$ elham build:controller YourController plain

Build Model Through CLI

$ elham build:model YourModel

Build Form Through CLI

$ elham build:form YourForm

Build Validator Through CLI

$ elham build:validator YourValidator

Help keyword for CLI generators

$ elham help build:keyword 

Elham Templating Engines

$ composer require twig/twig

Elham Migrations

$ echo "alias phinx='./phinx'" >> ~/.bash_aliases && source ~/.bash_aliases
$ phinx
$ phinx init
$ environments:
$ default_database: development
$ development:
          adapter: sqlite
          host: localhost
          name: db/database.sqlite
          user: root
          pass: ''
          port: 3306
          charset: utf8
$ phinx create Students
$ use Phinx\Migration\AbstractMigration;
$ class Students extends AbstractMigration
$  { 
$       public function change()
$       {
$   
$       }
$   }
$ 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');
$       }
$
$   }
$ phinx migrate
$ phinx rollback

Elham Playground

$ echo "alias psysh='./psysh'" >> ~/.bash_aliases && source ~/.bash_aliases
$ psysh
$ $enviornment = new Dotenv\Dotenv(__DIR__);
$ $environment->load();
$ $db = new config\database;
$ $db->connectThroughCapsule(); 
$ $db->connectThroughPDO(); 
$ $user = new Elham\Model\User;
$ $user->all()->toArray();

Elham Frontend Housekeeping

$ sudo apt-get install npm
$ sudo npm install -g gulp
$ sudo npm install gulp --save-dev
$ sudo npm install gulp-clean-css --save-dev

Elham Zero Second Deployment

$ sudo apt-get install node
$ sudo apt install nodejs-legacy
$ sudo npm install ngrok -g
$ ngrok http 8000

Elham Production Deployment