Remove guard from user model.

This commit is contained in:
James Cole
2018-02-10 08:21:20 +01:00
parent e69e6c1ce8
commit 2220963899

View File

@@ -68,9 +68,9 @@ class User extends Authenticatable
* *
* @return User * @return User
*/ */
public static function routeBinder($guard, string $value): User public static function routeBinder(string $value): User
{ {
if ($guard->check()) { if (auth()->check()) {
$userId = intval($value); $userId = intval($value);
$user = self::find($userId); $user = self::find($userId);
if (!is_null($user)) { if (!is_null($user)) {