1

I've followed the other posts/tutorials -Made a new model - put it into app/Models(I created this folder)/User.php

use Cartalyst\Sentinel\Users\EloquentUser as CartalystUser;

class User extends CartalystUser {

    protected $fillable = [
        'email',
        'username', /* i added this */
        'password',
        'last_name',
        'first_name',
        'permissions',
    ];

protected $loginNames = ['username'];

    }

Within

Vendor/cartalyst/sentinel/src/config/config.php

I changed the User to

'users' => [

    'model' => 'App\Models\User',

],

And since I'm using laravel 5.2 - I need to run

php artisan config:cache

According to https://stackoverflow.com/a/35614373

and then on the route I trie dto test it

Route::get('register_new', function() {

$user = Sentinel::register(array('username' => 'abcd', 'password' => '1234'));
});

Got an error back when i tried to run it

Invalid ArgumentException

No [login] credential is passed

I changed it back to array ('email' =>.....); and it worked.

Any help is appreciated :)

Community
  • 1
  • 1

1 Answers1

1

I finally got it

instead of changing the config within

Vendor/cartalyst/sentinel/src/config/config.php

I changed it within

config/cartalyst.sentinel.php