Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Sep 2, 2021
1 parent 4b1d0b9 commit d26e75b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/eloquent.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,15 @@ function table_name($model): string

return $model->getTable();
}

/**
* Get user model from configured guard driver.
*/
function user_model(string $driver = 'auth.defaults.guard'): string
{
$guard = config($driver);

return with(config("auth.guards.{$guard}.provider"), function ($provider) {
return config("auth.providers.{$provider}.model");
});
}

0 comments on commit d26e75b

Please sign in to comment.