Polymorphic Eloquent Relationships in Laravel 5

In this post I would like to show you creating polymorphic relationships in the Laravel5 application. Probable polymorphic relationships are the most advanced eloquent relationships in all available joins in Laravel. Polymorphic […]

Laravel eloquent complex queries on relationships

Very Laravel developer should know this little trick, using this trick you can define complex conditions on the eloquent relationships. This method chaining help you to add custom where/filter conditions for relation columns. […]

Laravel 5 Eloquent – Attribute casting

One of the Laravel 5 awesome feature is Attribute casting. Casting attribute means changing the attribute values to a particular type. for example Boolean, integer, strings. Eloquent models allows you to change datatype […]

Laravel 5 Eloquent lazy eager loading

Sometimes you may need to eager load a relationship after the parent modal has already been retrieved. For Example this may be very useful if you need to dynamically decide whether to load related models or not, or in […]