Support the ongoing development of Laravel.io →
Authentication Eloquent Blade
Last updated 2 years ago.
0

Hi,

your checkbox is always unchecked, because the third parameter is missing. See: https://laravelcollective.com/docs/5.3/html#checkboxes-and-rad...

0

noxify said:

Hi,

your checkbox is always unchecked, because the third parameter is missing. See: https://laravelcollective.com/docs/5.3/html#checkboxes-and-rad...

thanks for your answer but when i use true option for third parameter check box state always are checked i want to load state of checked or unchecked from DB like fifth line :

<td>{{ Form::checkbox('roles[]', $roles->id) }}</td>
Last updated 7 years ago.
0

I'm kinda confused as to what you're trying to do here? are you trying to save roles for a user or are you trying to save permissions for each role? This is how normally these three entities relate:

a user has many roles
a role has many permissions
a user has many permission through roles

so you will need a screen with checkboxes to save permissions for a role. and another screen with checkboxes to save roles for a user

0

astroanu said:

I'm kinda confused as to what you're trying to do here? are you trying to save roles for a user or are you trying to save permissions for each role? This is how normally these three entities relate:

a user has many roles ------------------------------------------>yes a role has many permissions--------------------------------->yes a user has many permission through roles-------------->yes

so you will need a screen with checkboxes to save permissions for a role. and another screen with checkboxes to save roles for a user

I want to save both of them in one screen if it is impossible? can you help me how to save permissions for a role

Last updated 7 years ago.
0
Last updated 6 years ago.
0

Got step by step solution to implement role and permission from : User role and permission in Laravel

0

Sign in to participate in this thread!

Eventy

Your banner here too?

asadi20 asadi20 Joined 4 Jan 2017

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.