Merge remote-tracking branch 'origin/master'

This commit is contained in:
frederikpyt
2020-06-30 09:19:56 +02:00
18 changed files with 175 additions and 86 deletions
@@ -13,6 +13,9 @@ class CreateUsersTable extends Migration
*/
public function up()
{
if(Schema::hasTable("users"))
return;
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name_first');
@@ -20,13 +20,17 @@ class CreatePermissionTables extends Migration
throw new \Exception('Error: config/permission.php not loaded. Run [php artisan config:clear] and try again.');
}
Schema::create($tableNames['permissions'], function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('description');
$table->string('guard_name');
$table->timestamps();
});
if(!Schema::hasTable("permissions"))
{
Schema::create($tableNames['permissions'], function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('description');
$table->string('guard_name');
$table->timestamps();
});
}
Schema::create($tableNames['roles'], function (Blueprint $table) {
$table->bigIncrements('id');
@@ -1,38 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateStaffTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('staff', function (Blueprint $table) {
$table->id();
$table->string('name_first');
$table->string('name_last');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->integer("phone")->unique();
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('staff');
}
}