created fleets table

create sessions table
modified register fleet in fleetscontroller
modified addpilot in fleetscontroller
modified render fleet display
modified update fleet function
created set fleet end time function
modified fleet class
created set fleet uri function
modified function to see if a token has a particular scope for Fleet
This commit is contained in:
2018-11-10 03:10:22 -06:00
parent 619180243e
commit b241f5509d
8 changed files with 260 additions and 76 deletions
@@ -0,0 +1,36 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFleetsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('Fleets')) {
Schema::create('Fleets', function (Blueprint $table) {
$table->increments('id');
$table->string('character_id');
$table->string('fleet')->unique();
$table->dateTime('creation_time');
$table->dateTime('fleet_end');
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('Fleets');
}
}
@@ -0,0 +1,37 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSessionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('sessions')) {
Schema::create('sessions', function (Blueprint $table) {
$table->string('id')->unique();
$table->unisgnedInteger('user_id')->nullable();
$table->string('ip_address', 45)->nullable();
$table->text('user_agent')->nullable();
$table->text('payload');
$table->integer('last_activity');
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('sessions');
}
}