Jul 22, 2024
2 Mins read
![Post Thumbnail](/images/posts/pimg_17216641531578313457029.jpg)
work on Database in codeigniter
- php spark make:migration create_users_table
-
<?php namespace App\Database\Migrations; use CodeIgniter\Database\Migration; class CreateUsersTable extends Migration { public function up() { $this->forge->addField([ 'id'=>[ 'type' => 'INT', 'unsigned'=>true, 'auto_increment'=>true, ], 'name'=>[ 'type'=>'VARCHAR', 'constraint'=>'255', ], 'username'=>[…