Laravel Community Tools by Tighten

Category "Eloquent" tricks

140 tricks
There is easy way to update relation model without query for related model.
monaye 11 years ago 13560
The easy way to define Eloquent Global Scopes with https://github.com/jarektkaczyk/laravel-global-scope
jarektkacz... 11 years ago 8302
Get results in a table when there are no results for the relationship
wallacemax... 11 years ago 20393
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... 11 years ago 9255
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... 11 years ago 8946
Using Sentry With Eloquent
Mahmoudz 11 years ago 9085
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 11 years ago 8254
Migrate Laravel database in Codeception
Mahmoudz 11 years ago 7007