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 13298
The easy way to define Eloquent Global Scopes with https://github.com/jarektkaczyk/laravel-global-scope
jarektkacz... 10 years ago 8102
Get results in a table when there are no results for the relationship
wallacemax... 10 years ago 20167
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 9014
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 8713
Using Sentry With Eloquent
Mahmoudz 10 years ago 8875
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 8035
Migrate Laravel database in Codeception
Mahmoudz 10 years ago 6882