louiss0 wrote a comment+100 XP
5mos ago
Practical TypeScript for the Laravel Developer: Ep 14, Generating Types with Laravel Wayfinder
You should find a way not to use namespace. As an industry we are moving away from TS only features.
louiss0 liked a comment+100 XP
5mos ago
Does it make sense to separate data fetching logic from a controller to somewhere else?
There are many ways to go about this.
- Keep it in the controller
- Move the fetch to the model
- Create a service class that you and move the fetch there
- Use some fancy pattern to achieve the result
Which ever you choose, don't make it more complex than you need to. The logic is quite easy to refactor if and when you need to.
Be aware that your API (When you move there) probably should use a JSON Resource
louiss0 wrote a comment+100 XP
5mos ago
Build a Forum With Laravel: Ep 41, Upgrading Vue
@lukedowning19 Did you ever find a new solution to this?