Great video, specially as you are back in your little window so we can keep an eye on you and you've remembered to record the right screen this time :-) Wow, what a great series this is, thank you Jay x
@adelshokry86617 жыл бұрын
100% Wooooow, speedy uploading is much appreciate it.
@roniestein7 жыл бұрын
Hi Alex. if you want prefer the findOrFail calls to the where ('id', $id) you just reverse the order Role::with('permissions')->findOrFail($id); Cheers
@AbhimanyuNaikareWebDeveloper6 жыл бұрын
I could not get the edit roles checkbox functionality working! All the permissions are still same as before editing. And in the console, clicking the checkbox does not change root array number.
@caz3385 жыл бұрын
For me, I was missing the colon in the input value -
@moe-alhakeem7 жыл бұрын
hey guys, the drop down menu for the top navigation works well with chrome but doesn't with firefox, anyone else got this problem?
@karmendra19847 жыл бұрын
This is super cool, I learnt everything about laratrust, one thing I really need to understand is, how "Team" thing work in laratrust. If you could make an individual video explaining team feature in laratrust it would be great.
@uraniumore73066 жыл бұрын
why is the model $role able to access the permissions table? it is because it is related by default?
@ahmedfathy37206 жыл бұрын
This is awesome Alex ... thank you so so much for your effort I have an problem here the colors not displayed correectly as yours .. the primary button looks white not grey .. the list items hover not green .. its light grey ... any one can help me fixing that !!?
@MehdiMirabi7 жыл бұрын
Hi Alex. first thanks for your teaching. I wrote all of related code of checkbox and radio tag but after that they didn't show. what is the problem?
@jebbush29647 жыл бұрын
Excellent video, I am really grateful for your efforts.
@devKazuto7 жыл бұрын
If I try to view a role it's always displaying "Superadministrator" for me even though the return view redirects me to the right id.
@1lucak17 жыл бұрын
Now it's slowly getting interesting regarding the ACLs :-)
@tanhaishi7 жыл бұрын
good to c u back again
@winmodif7 жыл бұрын
Can someone explain to me what code I need in order to get the right radiobox selected depending if the value of the column in the database is "0" or "1"? I tried all sorts of stuff but I can't get it to work. Thx!
@dimapindrik77337 жыл бұрын
I don't get it.. why the first Role::findOrFail($id) is not good? is it to reduce the queries?
@megaheinhtetzaw7 жыл бұрын
Hey could u tell me the laravel version you have used?
@AwaisAli-jy3cj5 жыл бұрын
hey there if you're having trouble while editing the role (not getting checked boxes automatically ) it's because buefy documentation is changed for b-checkbox-group so all you need to do is just delete b-checkbox-group and change custom-value => native-value in edit and create page just like this @foreach ($permissions as $permission) {{$permission->display_name}} ({{$permission->description}}) @endforeach
@patmull15 жыл бұрын
You are the beast man!!!! Thanks a lot!
@dadev36687 жыл бұрын
Again thanks for all this information shared with us I do have one question again shouldnt users be able to delete their profiles in any app in production ?
@Mark-ev1ge5 жыл бұрын
Use (only in update) $role->syncPermissions($request->permissions, true); In stead of $role->syncPermissions($request->permissions; It's kind of the same and laravel's sync() function, when the 2nd parameter is set to true it makes sure it overrides existing relations.
@olatunjilawal12047 жыл бұрын
I am getting this error with my vue [Vue warn]: Property or method "permissionType" is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option. I am confuse how do i solve this problem. Its been a problem for always
@ДенисЦенов-м4й7 жыл бұрын
Hi. Your app.js file (resources/assets/js/app.js) have to look like this ---> require('./bootstrap'); window.Vue = require('vue'); import Buefy from 'buefy'; Vue.use(Buefy); //Vue.component('example', require('./components/Example.vue')); $(document).ready(function(){ $('button.dropdown').hover(function(e){ $(this).toggleClass('is-open'); }); });
@mindaugaspetraitis40557 жыл бұрын
Have you solved it ? I have a same problem, please help me ,sir.
@bpraia6 жыл бұрын
getting "Vue is not defined" if I instantiate it in the blade file instead of app.js
@sithidethbouasavanh55587 жыл бұрын
Thank you for the debugging process.
@Dion_P4 жыл бұрын
If you don't want (or can't) use vue to check the boxes you can use: $role->permissions->pluck('name')->contains($permission->name). This outputs a boolean...
@entrymaar7 жыл бұрын
sir how i remove a role that i uncheked ?
@Mark-ev1ge5 жыл бұрын
Use $role->syncPermissions($request->permissions, true); In stead of $role->syncPermissions($request->permissions; It's kind of the same and laravel's sync() function, when the 2nd parameter is set to true it makes sure it overrides existing relations.
@Sinrise6 жыл бұрын
I feel like I missed a video where he describes how the relationship between Permissions and Roles are created and maintained...
@bernardchisumo40547 жыл бұрын
Hi Grea t video . Qns: what is eager loading?
@braticbokan12287 жыл бұрын
FatalThrowableError Class name must be a valid object or a string with my role->permissions relationship help anyone?
@VIKASH18707 жыл бұрын
Few days ago i had that same problem with eager loading . As solution i figured out a solution like $post = Post::findOrFail($id); // Or Post::find($id); $post->Tags; return $post; && er need to have relationship define in model. It was worked preety good.but i dnt know it was a good idea or not !
@mygreatjob7 жыл бұрын
Thank you !
@milou01047 жыл бұрын
Great work, i just noticed you forgot to close on those files, and also right above it you opened tag and close it by , you did many copy/paste so they are duplicated :)
@jodeveloper087 жыл бұрын
for eager Loading you could do $role = Role::findOrFail($id); $role->load('permissions');
@matheusdardenne6 жыл бұрын
That's lazy loading. For proper eager loading you should do $role = Role::with('permissions')->findOrFail($id);
@vinilr977 жыл бұрын
Nice!!
@christostsangaris47856 жыл бұрын
El Professor!!!
@Cybersix66667 жыл бұрын
great series, wish you had used Vue.js in it .
@NickyKeyse7 жыл бұрын
He has.
@IamJamesA6 жыл бұрын
If someone don't want to use vue do this to get all selected checkbox on the Role edit controller add this : $permissions= Permission::all()->pluck('id')->toArray(); In the edit view add: id,$permissions)?'checked':''}}>
@samdeacon79106 жыл бұрын
FFFFFFFF fucking b-checkbox group and radio deprecated EVERY VIDEO, Sorry not your fault a problem with changing libraries haha, videos are awesome !