laravel-forums
laravel-forums copied to clipboard
User class duplication
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() ] ); }
Yeah, because a lot of begginer users can just blindly copy the code and they won't understand what caused the error.