Laravel Community Tools by Tighten

Category "Eloquent" tricks

140 tricks
There is easy way to update relation model without query for related model.
monaye 10 years ago 13415
The easy way to define Eloquent Global Scopes with https://github.com/jarektkaczyk/laravel-global-scope
jarektkacz... 10 years ago 8172
Get results in a table when there are no results for the relationship
wallacemax... 10 years ago 20282
There are many tricks to return the response in `json`. Actually, if the returned value is an array or instance of "arrayableinterface" or "jsonableinterface" such as eloquent model, you could just return it, it'll be a json, magically. There are following three way i have noticed performance :) Thanks. #KeepSharing
pratikbuta... 10 years ago 9122
While returning of date field in JSON, I found some unexpected output which i have posted on stackoverflow. You can see here for more information: http://stackoverflow.com/q/31184170/1318946
pratikbuta... 10 years ago 8823
Using Sentry With Eloquent
Mahmoudz 10 years ago 8975
This is not how I write code on a daily basis, I brought everything to one place JUST OF THE PURPOS OF demonstrating how this stuff work. And in this example they do work:
Mahmoudz 10 years ago 8128
Migrate Laravel database in Codeception
Mahmoudz 10 years ago 6926