diff --git a/.env.full b/.env.full index c5317c1..ae683d7 100644 --- a/.env.full +++ b/.env.full @@ -43,8 +43,8 @@ DB_HUB_PASSWORD= DB_HUB_CHARSET=utf8mb4 DB_HUB_COLLATION=utf8mb4_0900_ai_ci -SESSION_DRIVER=database -SESSION_CONNECTION=mysql +SESSION_DRIVER=redis +SESSION_CONNECTION=default SESSION_LIFETIME=120 SESSION_ENCRYPT=false SESSION_PATH=/ @@ -64,6 +64,7 @@ REDIS_HOST=redis REDIS_PASSWORD=null REDIS_PORT=6379 REDIS_QUEUE=default +REDIS_QUEUE_CONNECTION=queue REDIS_CACHE_CONNECTION=cache SCOUT_QUEUE=true diff --git a/config/session.php b/config/session.php index f0b6541..b209e78 100644 --- a/config/session.php +++ b/config/session.php @@ -18,7 +18,7 @@ return [ | */ - 'driver' => env('SESSION_DRIVER', 'database'), + 'driver' => env('SESSION_DRIVER', 'redis'), /* |-------------------------------------------------------------------------- diff --git a/database/migrations/0001_01_01_000000_create_users_table.php b/database/migrations/0001_01_01_000000_create_users_table.php index a14b4ab..5a965db 100644 --- a/database/migrations/0001_01_01_000000_create_users_table.php +++ b/database/migrations/0001_01_01_000000_create_users_table.php @@ -38,15 +38,6 @@ return new class extends Migration $table->string('token'); $table->timestamp('created_at')->nullable(); }); - - Schema::create('sessions', function (Blueprint $table) { - $table->string('id')->primary(); - $table->foreignId('user_id')->nullable()->index(); - $table->string('ip_address', 45)->nullable(); - $table->text('user_agent')->nullable(); - $table->longText('payload'); - $table->integer('last_activity')->index(); - }); } /** @@ -56,6 +47,5 @@ return new class extends Migration { Schema::dropIfExists('users'); Schema::dropIfExists('password_reset_tokens'); - Schema::dropIfExists('sessions'); } }; diff --git a/resources/views/profile/show.blade.php b/resources/views/profile/show.blade.php index b3c3055..a089e25 100644 --- a/resources/views/profile/show.blade.php +++ b/resources/views/profile/show.blade.php @@ -29,13 +29,15 @@ @endif -
- @livewire('profile.logout-other-browser-sessions-form') -
+ @if (config('session.driver') === 'database') +
+ @livewire('profile.logout-other-browser-sessions-form') +
+ + + @endif @if (Laravel\Jetstream\Jetstream::hasAccountDeletionFeatures()) - -
@livewire('profile.delete-user-form')