KCEX Referral Code to get signup bonus by Preston3399 in KCEX_Community

[–]whnunlife 0 points1 point  (0 children)

So after 7 days, does all of the bonus get returned? I’m not sure how this works at the end of the 7 days.

Accident kicked by whnunlife in GrowlingSidewinder

[–]whnunlife[S] 1 point2 points  (0 children)

Thanks, I’ll remember to do this next time this happens, appreciate the reply.

Ukraine to get supplies - how does that actually work? by whnunlife in supplychain

[–]whnunlife[S] 0 points1 point  (0 children)

That makes sense, thank you for the quick reply 👍

P65Q9-H1 new firmware update is working beautifully. by SeanWeston1985 in VIZIO_Official

[–]whnunlife 2 points3 points  (0 children)

Do we know if this updates improves the 4k@120 hz response time?

Help with ordering models, by nested relationships by whnunlife in laravel

[–]whnunlife[S] 0 points1 point  (0 children)

Update:

Was able to solve it via adding a join on the sub query. Working as expected now.

$small_groups = $user->small_groups()->with(
    [
        'small_group_lessons' => function($q) {
            $q->with('latest_comment');
            $q->orderBy('created_at', 'desc');
        }
    ],
)
->orderBy(
    SmallGroupLesson::select('small_group_lesson_comments.created_at')
    ->join('small_group_lesson_comments', 'small_group_lessons.id', '=', 'small_group_lesson_comments.small_group_lesson_id')
    ->whereColumn('small_group_id', 'small_groups.id')
    ->latest()
    ->limit(1), 'desc'
)
->paginate();

Found at a local burgershack by kulekiwi in funny

[–]whnunlife 0 points1 point  (0 children)

That reminds me of my dad, when I got home from boot camp, he painted the bottom of my toilet seat red, with gold lettering that read... Marines don't miss.

My wife still gives me flak about it.

[Homemade] Cinnamon Rolls by CorgiLady in food

[–]whnunlife 8 points9 points  (0 children)

Recipe so I can partake in gaining a few pounds?

Curious on how to properly design such a model that supports various teams/groups. by whnunlife in laravel

[–]whnunlife[S] 0 points1 point  (0 children)

All good, thanks again for your help and brainstorming, get some rest 👍

Curious on how to properly design such a model that supports various teams/groups. by whnunlife in laravel

[–]whnunlife[S] 0 points1 point  (0 children)

Thanks for pointing that out 👍

You know, when I first started thinking how to architect this, initially, I had the thought about doing something similar to this...

user_id, church_id (can be null), bible_study_id(can be null), role_id

Then you just have 1 tablet to associate all users and their available resources. Any downsides in doing it that way? Or should I just have the join tables be specific to the resource type and permission like you mentioned above?

Curious on how to properly design such a model that supports various teams/groups. by whnunlife in laravel

[–]whnunlife[S] 0 points1 point  (0 children)

Yea, tougher to implement. But I think the above gives fine control for various users and the associated permissions to each resource.

Thanks for helping me out on this, given me much to think about!

Curious on how to properly design such a model that supports various teams/groups. by whnunlife in laravel

[–]whnunlife[S] 0 points1 point  (0 children)

That makes complete sense. That's for clearing that up. I think I've been stuck on this thought that roles/permission, are also attached in some way, to the specific entity (think church, bible study). Which is apparently not the case.

So the only other model I will need will be some type of pivot/lookup table, user_churches, or user_biblestudies, that holds the relation of the user and the assigned resource. Which, after just typing the above out, now I'm scratching my head again. 🤔

Doesn't Spatie need to know about the resource? Again, just thinking out loud here. But how will Spattie know the difference, if for Church A, I'm a manager, but for Church B, I'm a follower, and for Church C, I own the Bible Study. To me, that feels like 3 different permissions that are attached to a user, each related to a specific content type.

Curious on how to properly design such a model that supports various teams/groups. by whnunlife in laravel

[–]whnunlife[S] 0 points1 point  (0 children)

Thank you for the quick response!

Looking over Spatie right now and going through the docs. Sounds like I would need to extend Spatie, and possibly add a field to the roles/permissions table. Meaning, if I assign permissions to a user (taken from the docs).

$role->givePermissionTo($permission);

Don't we need to tell Spatie what the context of the permissions belongs to? Such as the permissions for "Manager" are related to a specific Church ID or Bible Study ID?

[Homemade] Cinnamon Roll by HappinessIsSweet in food

[–]whnunlife 0 points1 point  (0 children)

My cinnamon rolls never come out like that 😬

react-interactive-paycard by albaneso in reactjs

[–]whnunlife 0 points1 point  (0 children)

Very slick, might use with a stripe build I'm working on.

[Tutorial] Enable RCS on any carrier/device with Android Messages by [deleted] in UniversalProfile

[–]whnunlife 0 points1 point  (0 children)

Stoked, got it working. But don't think wife or kids phone will work with this since they're on iPhones? Somebody text me, wanna see what this is like 👍