26 lines
728 B
PHP
26 lines
728 B
PHP
<?php
|
|
//require bootstrap aka our database connection
|
|
require_once realpath(dirname(__FILE__) ."/../../bootstrap.php");
|
|
use Illuminate\Database\Capsule\Manager as Capsule;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
//Create password table with the rows as id, password, rememberToken and timestamps
|
|
Capsule::schema()->create("passwords", function (Blueprint $table){
|
|
$table->id();
|
|
$table->foreignId("group_id")->constrained("groups");
|
|
$table->string('password');
|
|
$table->rememberToken();
|
|
$table->timestamps();
|
|
});
|
|
|
|
|
|
/*
|
|
Syntex to create table in database
|
|
|
|
$table->string("texts");
|
|
|
|
$table => valuable;
|
|
string => datatype;
|
|
("texts") => name for the row in the database
|
|
*/ |