Skip to content

Commit

Permalink
Merge pull request #19 from xscasnya/master
Browse files Browse the repository at this point in the history
Change default user model to model from config
  • Loading branch information
Lexx YungCarter authored Jan 29, 2021
2 parents b02a683 + 7e99d21 commit 0423d3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ChatMessengerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ protected function setUserModel()
{
$config = $this->app->make('config');

$model = $config->get('auth.providers.users.model', function () use ($config) {
return $config->get('auth.model', $config->get('chatmessenger.user_model'));
$model = $config->get('chatmessenger.user_model') ?? $config->get('auth.providers.users.model', function () use ($config) {
return $config->get('auth.model');
});

Models::setUserModel($model);
Expand Down

0 comments on commit 0423d3c

Please sign in to comment.