Skip to content

Commit e9bbc3a

Browse files
superbichehootlex
authored andcommitted
Remove references to AppUser to allow using custom models structure (#24)
1 parent b0d7965 commit e9bbc3a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ModerationScope.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Hootlex\Moderation;
44

5-
use App\User;
65
use Carbon\Carbon;
76
use Illuminate\Database\Eloquent\Builder;
87
use Illuminate\Database\Eloquent\Model;

tests/BaseTestCase.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ function createPost($overrides = [], $amount = 1)
2626

2727
function actingAsUser()
2828
{
29-
return $this->actingAs(\App\User::create(['name' => 'tester', 'email' => mt_rand(1,9999).'[email protected]', 'password' => 'password']));
29+
$userModel = config('auth.providers.users.model', config('auth.model', 'App\User'));
30+
return $this->actingAs($userModel::create(['name' => 'tester', 'email' => mt_rand(1,9999).'[email protected]', 'password' => 'password']));
3031
}
3132
}

0 commit comments

Comments
 (0)