If you would look at the documentation for version 5.1 it has a better example of this. I think it will explain it better. Also the intermediate tutorial has a basic example of this.
help with double tables and roles
OK so after asking a question about routes I was told to use roles. I have watched the acl video on roles but do not understand how to add a role and permission when a user registers. I also need help understanding how to make a registration form insert set data into a table while taking the name password etc that a users table requires and splitting the two. Hope that makes since in other words I want the user info for login on the users table but the registration info on another table along with giving it a roles connection so that it connects the two with the user name. So that a dashboard could pull through there info. I have a artist a viewer and a sponsor but I need each of those to have set roles and permissions when they register. For example once a artist has paid they can see there dashboard and edit there profile but they can not see or edit anyone else's profile. I know that's a roles thing I just do not understand how to give a user roles upon registration. I need roles given automaticly depending non user type.
I tried this code sample for splitting the data but it did not work. Let me rephrase it added to both tables but gave errors about user_id column when I fixed that gave me another error about session guard.
$user = new User($data); $user_details = new UserDetails($data); $user->save(); $user->user_detail()->save($user_details);
I got that from http://stackoverflow.com/questions/31121454/registering-a-user-in-laravel-5-and-send-data-to-two-tables-is-this-correct.
Any help or pointing me to a great tutorial would be much appreciate ed I learn better from seeing it done and explained then I can do it myself and adjust as I need.
Thanks again.
Please or to participate in this conversation.