I have an app with laravel in which, I have different users with different roles. I added users manually in my DB (admin and user) but, when I try to login using email and password already recorded in DB, I got : These credentials do not match our records.
yes, I am using auth. I mean I insert them into mysql through the graphical interface.
I read somewhere, that I should create a seeder RoleTableSeeder for example to insert
@vapenation I should create a seeder for each one : UserTableSeeder, RoleTableSeeder, RoleUserTableSeeder ? I don't have a model called RoleUser so, when I try to create a seeder it's not working, althought I don't know what to put in that model if I create it ?
@vapenation i don't wanna create it. I just want to insert data into "role_user" table, so I thought that i should do it in the same way as User and Role, I mean using seeder. and when I try to create "RoleUserTableSeeder" it says :
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'App\RoleUser' not found
Run php artisan tinker and type bcrypt('whateverYouWantYourPasswordToBe').
Then input the output to your database.
Haven't tried it but I believe that should work flawlessly.
But do take note that in long term it is better to learn how to do it through Seeds and figure out how the models and relations work as soon as possible.
The problem was the hashing. I used seeding but this time, the passwords weren't in plaintext. I used : " \Hash::make('passwordadmin') "
and it's working