jeudi 29 novembre 2018

Backpack for Laravel - Permissionmanager: Can't create new user

so I got the following problem. I am using Backpack for Laravel with the PermissionManager Extension. By default, you have to log in via your email address, however, you can change that to log in with a username. Works fine if I (for example) seed the database. But for some strange reason, I can not create new users via the PermissionManager PermissionManager Extension. If I try the following error message is the result:

SQLSTATE[HY000]: General error: 1364 Field 'name' doesn't have a default value 
(SQL: insert into `users` (`updated_at`, `created_at`) 
values (2018-11-29 22:26:32, 2018-11-29 22:26:32))

Just for testing, I gave the name column a default value but the error message is the same, except the error now is: Field 'username' doesn't have a default value so it just takes the next column in my database.

Of course, I've changed the CRUD-Requests, Form-Requests and so on, to store a username instead of an email. But it looks like the Request doesn't get my form values. It only tries to store the timestamps.

Strange thing: If I reverse all I did in the Controllers and so on and create an email column again, it will just work fine... did I overlook something? How can I solve this error and store users with a username instead of an email?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire