mdk999

Experience

350

0 Best Reply Awards

  • Member Since 9 Months Ago
  • 0 Lessons Completed
  • 0 Favorites

28th September, 2018

mdk999 left a reply on Help Linking Models • 2 weeks ago

Can anyone offer some assistance with this question?

26th September, 2018

mdk999 started a new conversation Help Linking Models • 3 weeks ago

I have 4 models permtypes perms roles rolesperm

permtypes.id = perms.type_id role.id = roleperm.role_id permtypes.id = rolesperm.perm_id

permtypes would be (door,safe,garage, etc) permtype 'door' has many perms ('open-door',close-door','lock-door','unlock-door') pemtype 'safe' has many perms ('open-safe',close-safe','lock-safe','unlock-safe') roles would be ('father','mother','child') rolesperm would be assigning (father->open-door, Mother->open-door)

I need to be able to get.. permtypes and all associated perms roles and all associated rolesperm all permtypes , for a role and the associated roleperm

Thanks

mdk999 left a reply on PHP Error: Call To Undefined Method StdClass::save() • 3 weeks ago

Yes it is. Turned out to be an issue with vagrant :|

25th September, 2018

mdk999 left a reply on PHP Error: Call To Undefined Method StdClass::save() • 3 weeks ago

done. thx

mdk999 started a new conversation PHP Error: Call To Undefined Method StdClass::save() • 3 weeks ago

I have a model that throws the above error. I created a seeder for this model that doesn't seem to run (other seeders in the folder run). The model is below..

24th September, 2018

mdk999 started a new conversation Access Computed Value In Vue • 3 weeks ago

I have an array of users (User::all()) that I have looped in my blade (@foreach). I have a field which I've computed ($user->roles()->pluck('name')). I now need to convert part of my blade into a vue component. How best to get that computed field into the array so that I can access in Vue (user.assignedroles). I could say loop through my array and create a field and add that value but I think there should be a better solution. I did look at accessors and mutators but those wouldn't help me to access from Vue. Thanks

21st September, 2018

mdk999 left a reply on Assign Multiple Roles By Id • 3 weeks ago

Wanted to verify the input with the existing roles. Your latter suggestion worked - thanks

mdk999 started a new conversation Assign Multiple Role By Id • 3 weeks ago

How do I assign multiple roles by id? I have an array of role id's that I need to assign to a user.

This doesn't seem to work ..

$user->roles()->attach(Role::whereIn('id', $data['roles']));

13th January, 2018

mdk999 started a new conversation Add Additional User Data • 9 months ago

I'd like to add additional user data (Gender, height, weight, age, etc). I know I can extend the user model and add additional fields but not sure this is the best place for this data. I will probably need to get this information when accessing $user (ie $user->height). Suggestions on doing this? Thanks.

mdk999 left a reply on Best Way To Modify Auth In Laravel 5.5 • 9 months ago

Thanks for the quick reply. It was helpful and appreciated.

mdk999 started a new conversation Best Way To Modify Auth In Laravel 5.5 • 9 months ago

I ran make:auth and now have an authentication/login system. I'm looking to modify this but wanted some input on the best way to accomplish this. Do I modify the login controller? do I make my own, include traits the override the functions (ie getLogin). Hoping to add things like redirect based on user role, email confirmation, login with phone number, etc. Thanks much.

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.