? This week's code tips for Laravel developers A weekly thread ?

? You can freeze time in tests

? Understand the difference between `fresh()` and `refresh()`. One returns a *fresh* new instance, while the other *refreshes* an existing instance

? You can use use `whereBetween` to filter for records between two timestamps

? You can use constrained eager loading to increase performance of database queries that use relations

? You can queue Closures

? You can now call `newLine()` on Stringable instances

? You can transform variables passed to translation strings right in language files

? You can use `Notification::assertNothingSentTo()` to check that no notifications were sent to a specific user/notifiable model

? Bonus 1: `Carbon` cheat sheet for generating dates

? Bonus 2: Artisan `make:model` cheat sheet

? Last week's thread if want to read more tips ?

Follow us on Twitter

to be informed of the latest developments and updates!

You can easily use to @tivitikothread bot for create more readable thread!
Donate 💲

You can keep this app free of charge by supporting 😊

for server charges...