5
๐ฅ Use `::` to use Alpine property binding inside Blade templates
TIL: You can pass Alpine JS data to Blade components by using ::
โจ
#laravel
๐ฅ This week's code tips for Laravel developers
A weekly thread ๐งต
5
TIL: You can pass Alpine JS data to Blade components by using ::
โจ
#laravel
4
๐กIf you have a many-to-many relationship with a pivot table and extra columns, you can use the updateExistingPivot to update the extra column's value.
In this example, I need to update the status of a given subscriber:
3
#Laravel Tip ๐ฅ If you want to return a file content without initiating a download, you can use the stream() method. It will display the file in the browser.
2
Over the past few years, I've worked on some large apps that deal with events in different timezones. This can end up being quite confusing, as best practice is always to store dates in UTC.
That's where Carbon's shiftTimezone()
and setTimezone()
methods can help you out! โฌ๏ธ
1
โ๏ธโฐ When working with Carbon/timezones, you should be aware that setting the timezone during construction is not the same as altering the timezone later. ๐
We're writing a book, you can get it for free here. We're writing a book! Join the early access to get it for free.