I pulled into cartalyst / sentinel and I performed the migration needed to generate the tables.
php artisan migrate --package=cartalyst/sentinel
I noticed that these are the columns available in the users table
- ID
- Email
- password
- permissions
- last_login
- first_name
- last_name
- created_at
- updated_at
I want to add a username after the letter. So I created a migration file that does this.
//add a column username after email in the users table $table->string('username')->after('email')->unique();
Now when I use Sentinel :: register
$credentials = Input::all(); $user = Sentinel::register($credentials);
The username is not saved in the table. Thus, I managed to get it populated by editing vendor / cartalyst / sentinel / src / Users / EloquentUser.php
protected $fillable = [ 'email', 'username', 'password', 'last_name', 'first_name', 'permissions', ];
Now it works, the username is saved in the table. But im wondering if i am doing the right thing? Do not touch files in the package folder. How do we solve this?
source share