diff --git a/composer.json b/composer.json index d24839f..9ba6094 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,8 @@ "fideloper/proxy": "^4.0", "laravel/framework": "^6.0", "laravel/socialite": "^4.2", - "laravel/tinker": "^1.0" + "laravel/tinker": "^1.0", + "laravelcollective/html": "^6.0" }, "require-dev": { "facade/ignition": "^1.4", diff --git a/composer.lock b/composer.lock index 7ceb668..31e43a1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5cf02ad8e89ab54321f8a84c4a0eb1e8", + "content-hash": "2bcc3fd8a1a68ae90b1b21ec34cda566", "packages": [ { "name": "dnoegel/php-xdg-base-dir", @@ -978,6 +978,74 @@ ], "time": "2019-08-07T15:10:45+00:00" }, + { + "name": "laravelcollective/html", + "version": "v6.0.2", + "source": { + "type": "git", + "url": "https://github.com/LaravelCollective/html.git", + "reference": "2f181aba73390eec13d398bf57877b1cc3bc2588" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/LaravelCollective/html/zipball/2f181aba73390eec13d398bf57877b1cc3bc2588", + "reference": "2f181aba73390eec13d398bf57877b1cc3bc2588", + "shasum": "" + }, + "require": { + "illuminate/http": "6.0.*", + "illuminate/routing": "6.0.*", + "illuminate/session": "6.0.*", + "illuminate/support": "6.0.*", + "illuminate/view": "6.0.*", + "php": ">=7.2" + }, + "require-dev": { + "illuminate/database": "6.0.*", + "mockery/mockery": "~1.0", + "phpunit/phpunit": "~7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.0-dev" + }, + "laravel": { + "providers": [ + "Collective\\Html\\HtmlServiceProvider" + ], + "aliases": { + "Form": "Collective\\Html\\FormFacade", + "Html": "Collective\\Html\\HtmlFacade" + } + } + }, + "autoload": { + "psr-4": { + "Collective\\Html\\": "src/" + }, + "files": [ + "src/helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Adam Engebretson", + "email": "adam@laravelcollective.com" + }, + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "HTML and Form Builders for the Laravel Framework", + "homepage": "https://laravelcollective.com", + "time": "2019-09-23T06:16:50+00:00" + }, { "name": "league/flysystem", "version": "1.0.55", diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index 024721d..8e7ebb9 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -17,7 +17,7 @@ class CreateUsersTable extends Migration Schema::create('users', function (Blueprint $table) { $table->increments('id'); $table->string('name'); - $table->integer('character_id')->unsigned()->unique(); + $table->unsignedInteger('character_id')->unique(); $table->string('avatar'); $table->string('access_token')->nullable(); $table->string('refresh_token')->nullable(); @@ -32,7 +32,7 @@ class CreateUsersTable extends Migration if(!Schema::hasTable('user_roles')) { Schema::create('user_roles', function (Blueprint $table) { $table->increments('id'); - $table->integer('character_id')->unsigned(); + $table->unsignedInteger('character_id'); $table->foreign('character_id')->references('character_id')->on('users'); $table->string('role')->default('None'); $table->timestamps(); @@ -42,7 +42,7 @@ class CreateUsersTable extends Migration if(!Schema::hasTable('esi_tokens')) { Schema::create('esi_tokens', function (Blueprint $table) { $table->increments('id'); - $table->integer('character_id')->unique(); + $table->unsignedInteger('character_id')->unique(); $table->foreign('character_id')->references('character_id')->on('users'); $table->string('access_token'); $table->string('refresh_token'); @@ -54,7 +54,7 @@ class CreateUsersTable extends Migration if(!Schema::hasTable('esi_scopes')) { Schema::create('esi_scopes', function (Blueprint $table) { $table->increments('id'); - $table->integer('character_id'); + $table->unsignedInteger('character_id'); $table->foreign('character_id')->references('character_id')->on('users'); $table->string('scope'); $table->timestamps(); @@ -64,7 +64,7 @@ class CreateUsersTable extends Migration if(!Schema::hasTable('user_permissions')) { Schema::create('user_permissions', function (Blueprint $table) { $table->increments('id'); - $table->integer('character_id')->unisnged(); + $table->unsignedInteger('character_id'); $table->foreign('character_id')->references('character_id')->on('users'); $table->string('permission'); $table->timestamps(); @@ -86,6 +86,11 @@ class CreateUsersTable extends Migration $table->timestamps(); }); + DB::table('available_user_roles')->insert([ + 'role' => 'None', + 'description' => 'No roles whatsoever on the site.', + ]); + DB::table('available_user_roles')->insert([ 'role' => 'Guest', 'description' => 'Guest of the site.',