Skip to content

Commit

Permalink
Update User Model for Laravel 8
Browse files Browse the repository at this point in the history
  • Loading branch information
bpocallaghan committed Dec 2, 2020
1 parent e7404b9 commit 740d465
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
],
"require": {
"php": ">=7.0.0"
"php": ">=7.3.0"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions src/Impersonate.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Bpocallaghan\Impersonate;

use App\User;
use App\Models\User;

class Impersonate
{
Expand All @@ -13,7 +13,7 @@ class Impersonate
/**
* Create a new Impersonate instance.
*/
function __construct()
public function __construct()
{
$this->isActiveKey = config('impersonate.session')['is_active'];
$this->originalUserKey = config('impersonate.session')['original_user'];
Expand Down
6 changes: 3 additions & 3 deletions src/ImpersonateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Bpocallaghan\Impersonate;

use App\User;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\User;
use Illuminate\Http\Request;

class ImpersonateController extends Controller
{
Expand Down Expand Up @@ -43,4 +43,4 @@ protected function logout(Request $request)

return back();
}
}
}
4 changes: 3 additions & 1 deletion src/helpers.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

use App\Models\User;

if (!function_exists('impersonate')) {
/**
* Helper impersonate() without facade: Impersonate::login()
Expand All @@ -17,4 +19,4 @@ function impersonate(User $user = null)

return $impersonate;
}
}
}

0 comments on commit 740d465

Please sign in to comment.