23 lines
554 B
PHP
23 lines
554 B
PHP
<?php
|
|
//require bootstrap aka our database connection
|
|
require_once "../../bootstrap.php";
|
|
use Illuminate\Database\Capsule\Manager as Capsule;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
//Create has_voted table with the rows as id and timestamp
|
|
Capsule::schema()->create("has_voted", function (Blueprint $table){
|
|
$table->id();
|
|
$table->timestamps();
|
|
});
|
|
|
|
|
|
/*
|
|
Syntex to create table in database
|
|
|
|
$table->string("texts");
|
|
|
|
$table => valuable;
|
|
string => datatype;
|
|
("texts") => name for the row in the database
|
|
*/ |