تماشای این درس نیاز به اشتراک حرفه‌ای دارد.

Grammar and like models3:46

Okay, what's next? This is if you're serious about grammar. For example, if we had only one vote here, then this text should be vote instead of votes. And same for comments here. What's next? Like comments. So yeah, this would be the same as voting for ideas, but now we'd be liking comments. So in one of the episodes, I discussed this already. You can either have a polymorphic relationship and store it on the same table as the votes, or you can just have a separate table.

Comment likes and replies4:15

You can either have a polymorphic relationship and store it on the same table as the votes, or you can just have a separate table. If I were to implement Comments, I would probably have a separate table, mainly because the language that we're using will probably be likes or hearts for Comments and not the same as votes. What's next? Reply to Comments. So right now, our comments feature is very basic. You can only reply to the actual Idea and not to individual Comments. So that could be an extra feature you could work on.

Nested comments and defer4:40

You can only reply to the actual Idea and not to individual comments. So that could be an extra feature you could work on. This might involve some sort of recursion. So it can be quite tricky. Definitely take a look at this package, which has support for nested comments and a bunch of other features when it comes to having comments in your app. Next is wire:model. Okay, this is to minimize the number of requests. So you can just use wire:model.defer if you want to minimize those so that there's no round trip to the server every time, say, for example, you type something in here.

UI polish and slugs5:41

So yeah, that shouldn't be too hard to implement using Alpine. Next is blue shadow around button. This is just cosmetic. The blue buttons should have a subtle outer glow similar to this. And in here, I didn't do that. Slug for filters. Right now for our filters, if I were to filter something here, and if there's a space in the filter and all of them do have spaces, you'll see that the space gets encoded into %20 here, which isn't the cleanest URL. So I'm probably looking to making this a slug, and we are using that sluggable package.

Tailwind hover animation7:53

in here, just like Twitter does. And I have some code here just for the animation part, which we can take a look at quickly. Let's grab this. It's going to Tailwind Play. Where is that? So if you go to play.tailwindcss.com, you can play around with Tailwind. So let me just paste that code in. And you can see we have this animation here when I hover. So that would be the animation we have when we click either vote or unvote, something like that.

Caching and browser tests8:50

I'll probably take a look at that as well. Instead of hitting your database all the time, maybe having a caching layer in front will help with performance. Next is browser tests with Cypress or Dusk. So we have a pretty good test suite, but they're all feature tests on the HTTP layer. So we do have a good amount of JavaScript that's not being tested. So for those cases, I would reach for either Cypress or Dusk. We also have to do some browser testing in other browsers. We already saw one issue that we fixed in Firefox in the last video, and I haven't even taken a look at how it renders in Safari yet.

دوست دارید گاهی خبرهای Laracasts را ایمیل کنیم؟