1. Go to this page and download the library: Download puko/console library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
puko / console example snippets
/**
* #Table users
*/
class Users extends Model
{
/**
* #Column id
* #PrimaryKey
*/
public $id = 0;
/**
* #Column name
* #VarChar(100) not null
*/
public $name = '';
}
use pukoconsole\migration\Schema;
use pukoconsole\migration\Blueprint;
class CreateUsersTable
{
public function up(): void
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('email')->unique();
$table->timestamps();
});
}
public function down(): void
{
Schema::drop('users');
}
}