diff --git a/config/config.php b/config/config.php index 56f2a61..1678a69 100644 --- a/config/config.php +++ b/config/config.php @@ -2,7 +2,7 @@ return [ - 'user_model' => App\User::class, + 'user_model' => config('auth.providers.users.model'), 'message_model' => Lexx\ChatMessenger\Models\Message::class, diff --git a/src/Models/Thread.php b/src/Models/Thread.php index 2ba1d20..fc7ec66 100644 --- a/src/Models/Thread.php +++ b/src/Models/Thread.php @@ -328,7 +328,7 @@ public function getParticipantFromUser($userId) */ public function activateAllParticipants() { - $participants = $this->participants()->withTrashed()->get(); + $participants = $this->participants()->onlyTrashed()->get(); foreach ($participants as $participant) { $participant->restore(); } diff --git a/tests/EloquentThreadTest.php b/tests/EloquentThreadTest.php index fbc8873..afd1a0b 100644 --- a/tests/EloquentThreadTest.php +++ b/tests/EloquentThreadTest.php @@ -124,7 +124,7 @@ public function it_should_get_all_thread_participants() $this->assertCount(4, $participantIds); $this->assertEquals(999, end($participantIds)); - $this->assertInternalType('array', $participantIds); + $this->assertIsArray('array', $participantIds); } /** @test */