laravel-forums icon indicating copy to clipboard operation
laravel-forums copied to clipboard

User class duplication

Open egdavid opened this issue 9 years ago • 1 comments

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() ] ); }

egdavid avatar Feb 05 '15 13:02 egdavid

Yeah, because a lot of begginer users can just blindly copy the code and they won't understand what caused the error.

naneri avatar Mar 02 '15 17:03 naneri