Remove reference to guard from models.

This commit is contained in:
James Cole
2018-02-09 19:24:15 +01:00
parent 14772469ed
commit 53a6c10ada
17 changed files with 21 additions and 21 deletions

View File

@@ -118,11 +118,11 @@ class Account extends Model
*
* @return Account
*/
public static function routeBinder($guard, string $value): Account
public static function routeBinder(string $value): Account
{
if ($guard->check()) {
if (auth()->check()) {
$accountId = intval($value);
$account = $guard->user()->accounts()->find($accountId);
$account = auth()->user()->accounts()->find($accountId);
if (!is_null($account)) {
return $account;
}