This commit is contained in:
2026-03-11 00:12:40 -05:00
parent 6db7d745fd
commit 8de23b1895
2 changed files with 9 additions and 9 deletions

View File

@@ -121,13 +121,13 @@ class EveLoginController extends Controller
]
);
UserRole::updateOrCreate(
['character_id' => $characterId],
[
'role' => 'Guest',
'rank' => 0,
]
);
if (!UserRole::where(['character_id' => $characterId])->count() > 0) {
$role = new UserRole;
$role->character_id = $characterId;
$role->role = 'Guest';
$role->rank = 0;
$role->save();
}
$privilege->privilegesChanged($user);

View File

@@ -13,7 +13,7 @@ return new class extends Migration
{
if(!Schema::hasTable('available_user_roles')) {
Schema::create('available_user_roles', function (Blueprint $table) {
$table->increments('id');
$table->id('id');
$table->string('role');
$table->string('description');
$table->timestamps();
@@ -36,7 +36,7 @@ return new class extends Migration
if(!Schema::hasTable('user_permissions')) {
Schema::create('user_permissions', function (Blueprint $table) {
$table->increments('id');
$table->id('id');
$table->unsignedBigInteger('character_id')->default(0);
$table->string('permission');
$table->timestamps();