
Lead PHP Developer at Returnless / Laravel Fan / Sport & Cat Lover / Bosschenaar / Dad of Vik
Venlo, Nederland
Joined September 2009
- Tweets4.4K
- Following626
- Followers818
- Likes849
Replying to @madebygoogle
@madebygoogle is it normal for the outdoor camera cables to just break down after 3,5 years? Camera stopped working and found out the issue just now.. This is the 4th Nest item that broke down.. #badquality 😕
1
27
Laracon was awesome! I had quite a lot of good laughs and have been inspired a lot! Big shout out to all the speakers and basically the whole community!
And special thanks to @LukeDowning19 for the briljant quote: “know the rules and know when to break them”.
On to the next!
1
61
And the usage is simple as well. Just push some unsaved models into an array / collection and pass it along the insertModels() method like so:
1
27
Implementation is easy, you probably already have Abstract model class, just add the trait there..
1
18
For example, you are using another trait like the one below. The regular insert() method won't take this into account and you'll need to manually add this field to each insertable, plus the timestamps are probably not defined as the model you try to insert isn't yet created..
1
20
Lets take an example of a Country table. Which is perfect for this trait. When you need to lookup a country model or even a country ID in lets say an Importer or when mapping an API response. You could eager load the countries yourself or use this little trait like so:
1
44
A neat little trait for lookup tables in Laravel, with a little bit of help of the once method of @spatie_be.
2
168
Almost a half a year working at this awesome job at Returnless.com, and love to show of our beautiful #laravel tool made for webshops!
The all-in-one Return Platform with one clear overview of all your returns from any source. Check out the vid:
linkedin.com/posts/returnles…
72












