jwmcpeak's avatar

jwmcpeak wrote a comment+100 XP

2w ago

@khaled-sayed Yes, a typical Laravel app is a monolith. It's a single codebase that has views, controllers, services, queues, etc. It's one big codebase that is deployed all together.

Microservices is about breaking the server into multiple independent and smaller services. For example: a user service to just manage users, a service for billing, and yet another service just for reporting. They're developed individually (and sometimes in different languages) and deployed separately.

jwmcpeak's avatar

jwmcpeak liked a comment+100 XP

2w ago

very cool!

jwmcpeak's avatar

jwmcpeak wrote a comment+100 XP

2w ago

@fefo-p Yep, thanks @sid405 for providing the link!

jwmcpeak's avatar

jwmcpeak wrote a comment+100 XP

2w ago

@xmaop @sebastiangperez Oh wow. Thanks, y'all. I'll look and see what happened there.

jwmcpeak's avatar

jwmcpeak wrote a comment+100 XP

2w ago

@ctrlaltdelme With Navigate, Livewire's JavaScript handles the click event before the browser can send the request to the server. So, the server still receives the request, but it was sent via fetch() as opposed to typical browser navigation.

As for security: it's still Laravel. Routes are still protected with the auth middleware.

jwmcpeak's avatar

jwmcpeak wrote a comment+100 XP

2w ago

@ailyye lol thanks

jwmcpeak's avatar

jwmcpeak wrote a comment+100 XP

2w ago

@ldommer Habit, really.

jwmcpeak's avatar

jwmcpeak liked a comment+100 XP

2w ago

Thank you for this wonderful series on livewire.

I am happy to be taking this training course, especially with one of the best trainers on Laracasts.

jwmcpeak's avatar

jwmcpeak wrote a comment+100 XP

2w ago

@acandael @Daniel Gauthier You can still use controllers because it's still Laravel. If you don't need the interactivity that Livewire gives you for a set of pages/URLs, then use controllers as usual. When you want the interactivity that Livewire provides, then use a component.

jwmcpeak's avatar

jwmcpeak wrote a comment+100 XP

2w ago

@ailyye It's a good question with, at least from me, not a good answer. I don't like Angular.

jwmcpeak's avatar

jwmcpeak wrote a comment+100 XP

2w ago

@sid405 Looks good. Thanks!

jwmcpeak's avatar

jwmcpeak liked a comment+100 XP

2w ago

Perhaps it'd be worth completing the messages() method in the agent in the previous video otherwise this one won't work

Something along these lines


    public function messages(): iterable
    {
        return TicketMessage::where('ticket_id', $this->ticketId)
            ->get()
            ->map(function (TicketMessage $message) {
                $role = is_null($message->user_id)
                    ? Laravel\Ai\Messages\MessageRole::Assistant
                    : Laravel\Ai\Messages\MessageRole::User;

                return new Laravel\Ai\Messages\Message($role, $message->body);
            })->toArray();
    }

jwmcpeak's avatar

jwmcpeak wrote a comment+100 XP

2w ago

@mmonari Thanks. I tend to teach how I like to learn. As I learn something new, I'm more interested in the concepts because I can apply them however/whenever needed.

jwmcpeak's avatar

jwmcpeak liked a comment+100 XP

2w ago

Hello Jeremy, Just some quick feedback. I gotta say, I love this "vanilla" way of simply writing code to pass on ideas and concepts. Without interference from auto completion tools while listening to and watching you in action, this makes so much easier to assimilate it all.

While you probably should've extracted functionalities to services and used Livewire, It is just as nice to watch it being built like that 😄 thanks so much for this great series!

jwmcpeak's avatar

jwmcpeak liked a comment+100 XP

2w ago

If anyone ends up getting 400 errors form OpenAi on tool calls: https://github.com/laravel/ai/issues/313

jwmcpeak's avatar

jwmcpeak wrote a comment+100 XP

3w ago

@Antimated That is the carbon theme.

jwmcpeak's avatar

jwmcpeak wrote a comment+100 XP

3w ago

@Antimated Yep! I forgot to mention backticks here, but we use them later in the series.

jwmcpeak's avatar

jwmcpeak wrote a comment+100 XP

3w ago

@connor1231 It's separation of concerns. The benefit of emitting an event is that the game doesn't have to worry about, or know how to, display a message.

jwmcpeak's avatar

jwmcpeak liked a comment+100 XP

3w ago

Going to learn Vue later, and definitely agree with Jeremy regards to learning the fundamentals

jwmcpeak's avatar

jwmcpeak liked a comment+100 XP

3w ago

🔥

jwmcpeak's avatar

jwmcpeak liked a comment+100 XP

3w ago

Jeremy is the GOAT

jwmcpeak's avatar

jwmcpeak liked a comment+100 XP

5mos ago

I tend to like fat models, because I think that they're more than just data, they are "entities". So they perform actions as well. But I extract the code sometimes when it makes sense for me. So, like Povillas would say: it depends.

jwmcpeak's avatar

jwmcpeak liked a comment+100 XP

5mos ago

@jwmcpeak I wrote a post on database views a couple of years ago, and I think some of your viewers might benefit from it.

https://tray2.se/posts/use-a-view-instead-of-a-complex-eloquent-query-in-your-laravel-application