kevin_mckee

kevin_mckee

VP of IT at Buildingstars

Member Since 2 Years Ago

St. Louis, MO

Experience Points
28,230
Total
Experience

1,770 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
258
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 6
28,230 XP
Nov
10
2 weeks ago
Activity icon

Commented on Private S3 Uploads With Authorization

Yeah, I typically spell it with a "z" when I'm not making spelling errors.

Activity icon

Commented on Interactive Charts

Here's the source code at the beginning of the lesson if anyone needs it: https://github.com/laracasts/teamsy/tree/lesson-10-start

Nov
04
3 weeks ago
Activity icon

Commented on Tenant Global Scope

Jetstream can be installed with Livewire and Alpine.js can be easily added. This series doesn't cover Jetstream at all.

Activity icon

Commented on User Impersonation

There is a "view source" link in the table of contents for each lesson, but that gives you the finished code. In this case, if you're looking for the code for the start of the lesson, here it is: https://github.com/laracasts/teamsy/tree/lesson-9-start

Nov
03
3 weeks ago
Activity icon

Replied to Livewire Search After N Characters

I'm not aware of any way to conditionally send the request based on some criteria. There are modifiers like lazy or defer but none where you can add logic to determine if a request should be made or not.

Activity icon

Replied to Livewire Search After N Characters

Are you trying to prevent the network request, or just prevent the filtering? If you just want to prevent the filtering you could add a conditional to your query. For example:

if(strlen($this->search) > 3) { ...

Oct
30
4 weeks ago
Activity icon

Replied to Do You Really Like Tailwind And Livewire ?

This file is so silly. I never wrote my CSS like that. It’s obvious many those classes are used in a single place.

Before tailwind I used a lot of styles directly on the element. I love tailwind because now I don’t have to do that and I still get to avoid this nonsense.

Oct
29
4 weeks ago
Activity icon

Commented on Beware The Flying V Complication

This was incredible. It's amazing how difficult it can be to understand the code even when it's just a few lines long until you do the refactor.

Activity icon

Commented on Use TailwindUI For The Public Pages

I won't cover this specifically, but it would be very simple. If you create any API endpoint and want to get data out of the database that is not restricted by the tenant, then it should just work since there's no tenant_id in the session.

If for whatever reason that didn't work, then you could just apply something like this to ignore the scope entirely. App\MyModel::withoutGlobalScope('App\Scopes\TenantScope')->get();

Activity icon

Commented on Tenant Global Scope

I did see that error a few days ago. However, I just did a brand new install and it worked this time. You might try again and see if it works for you. Otherwise, you may have to install some peer dependencies directly.

Activity icon

Commented on Livewire File Uploads To Amazon S3

When one is as helpful as you are in the discussions, you're bound to show up in videos! Thanks for your help on that error.

Also, this is great information for AWS security. Thanks for sharing.

Activity icon

Commented on Livewire File Uploads To Amazon S3

That's awesome, I'm glad you are liking it. The loading states video is kind of a bonus video that I put out on YouTube. For anyone who hasn't seen that video, here's the link: https://www.youtube.com/watch?v=dUY1iwOxGiY

Activity icon

Commented on Livewire File Uploads To Amazon S3

Here is the list of changes. Sorry, I didn't have time to do everything on video: https://github.com/iAmKevinMcKee/teamsy/compare/lesson-6...lesson-7-prep

Activity icon

Commented on Livewire File Uploads To Amazon S3

I didn't have time to do everything on video, but you can always access the source code. Here are all the changes I made in between Lesson 6 and Lesson 7. https://github.com/iAmKevinMcKee/teamsy/compare/lesson-6...lesson-7-prep

Oct
28
1 month ago
Activity icon

Commented on Use Livewire With Blade Components

Awesome, thanks for the tip!

Activity icon

Commented on Livewire File Uploads To Amazon S3

Figuring out AWS is really hard! That's why I wanted to make this video, because I know how hard it can be and since I already figured it out, I wanted to share. :)

Activity icon

Commented on Livewire File Uploads To Amazon S3

If you want to just copy the code down and start from where I'm starting in this video, you can grab it here: https://github.com/iAmKevinMcKee/teamsy/tree/lesson-7-prep

Oct
27
1 month ago
Activity icon

Commented on Use Livewire With Blade Components

Because the ComponentAttributeBag is macroable, it looks like Livewire has added $attributes->wire('model')->value() which would replace $attributes->whereStartsWith('wire:model')->first(). It's not that many fewer characters, but does feel a little nicer.

This Livewire macro was not available at the time I recorded the lesson though, otherwise I would have used it.

Oct
21
1 month ago
Activity icon

Commented on Refactor To A BelongsToTenant Trait

I never said it was infallible. That's just how I prefer to write my applications.

I am glad we are having the discussion because I hope people read it and choose what works best for them. If you prefer to use a foreign key, go for it!

Activity icon

Commented on Use TailwindUI For The Public Pages

Yes there are 5 more videos coming up soon.

Activity icon

Commented on Use Stubs To Set The Tenant ID

Check out the next video. :)

Oct
19
1 month ago
Activity icon

Commented on Use TailwindUI For The Public Pages

That's a default behavior of Livewire. If you aren't using Livewire, you won't get this.

Activity icon

Commented on Refactor To A BelongsToTenant Trait

I'm sure using a foreign key would probably work just fine. The only reason I don't use foreign keys is because I don't like to set what happens on delete to a foreign key in SQL. I like all of that to live in the application logic. I've seen big applications get to the point where some relationships have foreign keys with constraints on delete, and other models use events to delete related records. Things can become jumbled and confusing.

I like all this logic to be in the application domain and not handled by the database, so I don't use foreign keys. However, it's a personal preference and there's no reason you couldn't use them.

Activity icon

Commented on Use Stubs To Set The Tenant ID

Jetbrains Mono. I love that font. :)

Activity icon

Commented on Use Stubs To Set The Tenant ID

Yep. This is it. There may be models where a tenant_id doesn't make sense. I like to be able to decide which model needs it and which doesn't.

Activity icon

Commented on Tenant Global Scope

Yep, nothing wrong with using session('tenant_id') instead of session()->get('tenant_id'). I prefer the latter out of convention, but there's nothing wrong with either approach.

Activity icon

Commented on Tenant Global Scope

You can see in a few lessons where a super admin has access to all the data without needing to add withoutGlobalScope.

I'm curious why you ended up needing to remove the global scope. In my SaaS product, I literally have never needed to remove the tenant scope.

Activity icon

Commented on Meet Teamsy

Think of a tenant as a customer. Each customer add additional users to their account. Imagine a CRM application. Your company uses the software and adds multiple users from your company and 1000 leads. However, when I sign up for that site and add people from my company, we don't have access to your company's 1000 leads.

Activity icon

Commented on Meet Teamsy

There are multiple session drivers in Laravel. I recommend avoiding using cookie as a driver so the session stays on a server somewhere instead of the front end. https://laravel.com/docs/8.x/session#configuration

Activity icon

Commented on Meet Teamsy

I don't specifically cover this. I do cover uploading images, so having a tenant upload their own logo should be easy after watching the course, but there's nothing about custom colors or anything like that.

Oct
16
1 month ago
Activity icon

Commented on Refactor To A BelongsToTenant Trait

Definitely looks simpler. Assuming it works, looks like a nice improvement.

Activity icon

Commented on Use TailwindUI For The Public Pages

I have actually checked with Adam and he approved me doing this lesson and posting the code in my open source repo. Here's the link to this lesson on Github. https://github.com/iAmKevinMcKee/teamsy/tree/lesson-5

Oct
15
1 month ago
Activity icon

Commented on Use Stubs To Set The Tenant ID

Wait for the next video. I think you'll find the next refactor more to your liking.

Activity icon

Commented on Use Stubs To Set The Tenant ID

I don't cover that in this course unfortunately. This is a 1 to 1 relationship.

Activity icon

Commented on Use Stubs To Set The Tenant ID

There are some cases where I don't need a tenant_id. I would use it in a Task model, but there are others where I wouldn't use it. That's why I use the stub, because I can always delete it if I don't need it.

Activity icon

Commented on Use Stubs To Set The Tenant ID

Yes, this is not the ideal implementation. Wait for the next video and then we can chat. :)

Oct
10
1 month ago
Activity icon

Commented on Tenant Global Scope

The course was all done in Laravel 7, so to follow along I would recommend using that.

Activity icon

Commented on Tenant Global Scope

In the next video we will add a listener to clear the tenant id from the session on logout. You can add that now to solve this issue.

Oct
09
1 month ago
Activity icon

Commented on Meet Teamsy

I'm glad you're excited.

The biggest reason I prefer this approach is the simplicity of it versus having multiple databases. I like that you can create the multi tenancy logic quickly without a package and fully understand everything.

I'd love to hear what you think as you see the course unfold and know how it compares to your approach.

Activity icon

Commented on Meet Teamsy

This will only focus on a single database design. I hope you still enjoy the course.

Activity icon

Commented on Tenant Global Scope

Yep this will definitely work. I have other reasons to use the session as well, but this is completely valid.

Keep in mind that you can choose from a variety of different session drivers. I never fell dirty putting anything into the session when I'm using redis. The only driver I don't recommend is cookie since it's exposed on the front end.

Activity icon

Commented on Tenant Global Scope

Great point. This whole series was recorded before Laravel 8 came out.

Activity icon

Commented on Tenant Global Scope

You can, but it can cause issues with logging in and logging out. You have to add an extra conditional in the booted method to address that.

As we get near the end of the course to the super admin panel, the approach I'm taking here will come into play again.

I prefer using the session but there are multiple ways to do it.

Activity icon

Commented on Tenant Global Scope

Thanks, I hope you like the rest of the series.

Activity icon

Commented on Tenant Global Scope

Thanks Meracle!

Sep
28
2 months ago
Activity icon

Commented on Headless Livewire

I guess it depends on your definition of headless. My definition is "without a UI", which is how this example works until the very end. If you have a different definition, then feel free to call this approach whatever you like. :)

Activity icon

Commented on Headless Livewire

Yes. Of course you can choose to do make fewer calls to the backend.

Jul
20
4 months ago
Activity icon

Commented on Beware Of The Filtered Array

I never knew Tinkerwell had a PHPStorm plugin. Very cool!