You should give the BishopB\Forum\User class a different name, since most of the Laravel applications already have a working User class.
Or another option would be to give a different 'One-to-one mapping' example:
use \BishopB\Forum\User as FUser; //(F for Forum)
And then:
function create_an_app_user() {
// make this app user a member moderator
$user = UserRepository::createWithRoles(
[
'Name' => 'Jane Q. Doe',
'Password' => FUser::crypt_password('the-initial-password', 'vanilla'),
'HashMethod' => 'vanilla',
],
[ RoleRepository::member(), RoleRepository::moderator() ]
);
}
You should give the BishopB\Forum\User class a different name, since most of the Laravel applications already have a working User class.
Or another option would be to give a different 'One-to-one mapping' example:
use \BishopB\Forum\User as FUser; //(F for Forum)
And then:
function create_an_app_user() { // make this app user a member moderator $user = UserRepository::createWithRoles( [ 'Name' => 'Jane Q. Doe', 'Password' => FUser::crypt_password('the-initial-password', 'vanilla'), 'HashMethod' => 'vanilla', ], [ RoleRepository::member(), RoleRepository::moderator() ] ); }