If you ever created complex global scope constraint, you must have faced a challenge with defining r...
Pretty much every app needs decent search engine. Nowadays specialized engines like ElasticSearch ar...
Do you use Eloquent in your apps? It's simply fun to work with, right? I think the same, but after s...
I want to introduce nice and useful package for DB revisions. It works out of the box with Eloquent...
Explained here: http://laravel.io/bin/rr4QQ#8,44
Let's start with: // belongsTo / hasOne $model->relation; // returns related model instance or nu...
Dynamic property returns always related Model or null depending if the relation exists or not. So it...
Because it doesn't use Model s method but HasOneOrManys. You operate on relation, not on the model....
Use has and whereHas methods for limiting results based on the relations: $bienes = Bien::whereHas(...
This is caused by the way Eloquent guesses the foreign key for belongsTo, which is methodName_id by...
The Laravel portal for problem solving, knowledge sharing and community building.