Тёмный
No video :(

Refactoring real-world Laravel app. Who wrote THIS CODE?! 

Przemysław Przyłucki
Подписаться 5 тыс.
Просмотров 10 тыс.
50% 1

I live for the clickbait.
In this video we'll focus on refactoring a Laravel application using the 80/20 rule. We'll just go through the files, see what we can do to improve the code slightly without stressing over the details.
More me:
saaslaravel.com

Опубликовано:

 

22 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 24   
@limitlesskode
@limitlesskode Год назад
The refactor when you delegated the user service instantiation to laravel was quite cool. I was manually creating these instantiations in the constructor body and I think I will refactor to your approach.
@natenatters
@natenatters Год назад
I really like the refactoring videos! Nice job. Good to aim for the 80/20 rule too, you seem to get a lot of work done quickly!
@saaslaravel
@saaslaravel Год назад
Thank you Nathan! I'm learning Vim so maybe I'll be able to push that speed even further 😊
@natenatters
@natenatters Год назад
@@saaslaravel Oh no 😆Im happy to watch you work in Vim, but I refuse to learn it as an IDE haha
@saaslaravel
@saaslaravel Год назад
@@natenatters It's def challenging but that's what makes it fun haha :D
@user-zh2oz9fe4m
@user-zh2oz9fe4m Год назад
It's a very useful video! Looking forward to seeing more of these)
@gotoslovakia
@gotoslovakia Год назад
Great job. Thank you
@mohammadashrafuddinferdous9347
At 8:24, UserService isn't the appropriate service class. It should be user order service if there are any other type of order services. Otherwise, user service will be a god service, sooner or later. And i think usrr service should always return user objects. It can be user model or dto or the collection of dto or user models. But when it returns anything else, it breaks the law of diameter.
@saaslaravel
@saaslaravel Год назад
This project isn't super complicated and doesn't have loads of code, but if I was working on something more complex, I agree that UserOrderService is better
@mohammadashrafuddinferdous9347
@Przemysław Przyłucki Surely, if it's not complicated and only one person is working on it, then the path is ok to me too.
@mohammadashrafuddinferdous9347
@@saaslaravel I like you super simple dto btw.
@binaryfire
@binaryfire Год назад
Great video! What are your thoughts on actions vs services?
@saaslaravel
@saaslaravel Год назад
I use actions as well - mostly when there a piece of logic that needs to be reused between different parts of the system, or when a service method has to interact with a 3rd party
@2gbeh
@2gbeh 3 месяца назад
When to use Actions and when to use Traits ?
@GergelyCsermely
@GergelyCsermely Год назад
Thanks
@karlson2804
@karlson2804 Год назад
Very, very cool format, if possible, shoot more, please.
@_bijaydas
@_bijaydas Год назад
I see you have a few Enums. What is preferred storing statuses for products, users etc. in Enums or in a table? I used to use Enums but now converted all status to status table.
@saaslaravel
@saaslaravel 11 месяцев назад
I use enums that cast to an int and just save the int in the db. This way I have nice type hinting in the app layer and can add more enums without having to alter db
@SilverPaladin
@SilverPaladin 8 месяцев назад
@@saaslaravel I saw your Enum approach in another video and I love it! I hate having to touch the db to add or change the enums! I guess we could also add a layer on top of that for different languages?
@akhileshkumar-iu9uq
@akhileshkumar-iu9uq 5 месяцев назад
Can u name the vscode extension which make ur code very real
@carvalho1990
@carvalho1990 11 месяцев назад
Is there a repo for this code? Amazing! thanks!
@saaslaravel
@saaslaravel 11 месяцев назад
Unfortunately not, that's a private project
@Nodsaibot
@Nodsaibot Год назад
ANY php project that it requires use of the CLI means you are doing things WRONG, PHP was not created for this use environment
@SunilYadav-tm6kt
@SunilYadav-tm6kt Год назад
Not at all, its depends on requirement and use case
Далее
Laravel: Repository Pattern in practice
27:13
Просмотров 11 тыс.
WOW! Laravel's pipeline pattern is AWESOME
20:39
Просмотров 12 тыс.
МЕГА МЕЛКОВЫЙ СЕКРЕТ
00:46
Просмотров 179 тыс.
Refactor "Senior" PHP Code with Early Returns
12:09
Просмотров 26 тыс.
Laravel + Livewire todo app (and so much more)
16:41
Просмотров 39 тыс.
Automated Refactoring With Rector
7:51
Просмотров 2,1 тыс.
I've been using Redis wrong this whole time...
20:53
Просмотров 353 тыс.
Laravel SaaS Idea: Mockup Generator
41:00
Просмотров 1,7 тыс.
I Cannot Believe TypeScript Recommends You Do This!
7:45
LARACON EU 2024 // TAYLOR OTWELL :: LARAVEL UPDATE
1:10:48
Laravel: The BEST way to handle exceptions
9:29
Просмотров 15 тыс.