Laravel TDD Example: Refactoring and Renaming Eloquent Model

preview_player
Показать описание
One free lesson from my latest course called Laravel Refactoring Examples.

- - - - -
Support the channel by checking out our products:
Рекомендации по теме
Комментарии
Автор

PHPStorm can rename the lower and uppercase names in one step ... when you turn on the ABC icon next to "replace" input and turn off "Match Case" ... then it will automatically change reservation to product, Reservation to Product, RESERVATION do PRODUCT and so on ...
... also you can do it in several files in one step; just select them and Ctrl+Shift+R will show the replace dialog with for all of the files.

mpesava
Автор

My advice to everyone - always write tests for your web applications. Once you get used to it you will never waste a lot of time debugging all possible errors.
And when you realize your tests are too complicated, you start decoupling your code to make them easier to write. And from this very moment your way of thinking starts changing.

alexaverkiyev
Автор

I agree with the tests, but I would have done that by using the PHPStorm's "Relpace in Files" dialog (Shift+Ctrl+R in Windows). This way you will get a list of all "reservation(s)" keywords used in the whole project or in a specific directory if you want, and you will have the option to pick which ones you would like to replace with "product(s)". If anything goes wrong then I would rollback using the VCS.

OkanUltimatum
Автор

I hope you charged them a lot of money for that! Going from reservations to products looks to me like a complete redesign!

martinh
Автор

How can this case called TDD, if you functionality is written already.

bumblebity
join shbcf.ru