<?php

$path = '../../../';
require($path . 'core/includes/header.inc.php');


use Illuminate\Database\Capsule\Manager as Capsule;
use Illuminate\Database\Schema\Blueprint;

//Creating schema

/*
Capsule::schema()->create('alanstest', function (Blueprint $table) {
    $table->increments('id');
    $table->string('username');
    $table->string('first_name')->nullable();
    $table->string('last_name')->nullable();
    $table->string('email');
    $table->string('password');
    $table->timestamps();
});

*/

//Add A column



$field='test43';

if(!Capsule::schema()->hasColumn('alanstest', $field))
{

Capsule::schema()->table('alanstest', function($table) use($field): void
{
    $table->string($field);
});

}