We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ceba3fa commit f275956Copy full SHA for f275956
src/Url.php
@@ -81,8 +81,14 @@ public function hasExpired(): bool
81
*/
82
public function user()
83
{
84
- $provider = config('auth.guards.api.provider');
+ $provider = config('auth.guards.web.provider');
85
86
- return $this->belongsTo(config("auth.providers.{$provider}.model"));
+ $userModel = config("auth.providers.{$provider}.model");
87
+
88
+ if (! class_exists($userModel)) {
89
+ throw new \Exception("User model not found");
90
+ }
91
92
+ return $this->belongsTo($userModel);
93
}
94
0 commit comments