Top "Eloquent" questions

The Eloquent ORM included with Laravel provides a beautiful, simple ActiveRecord implementation for working with your database.

Laravel sortBy paginate

I have a posts table and comments table, comment belongs to post, and I have the relationship setup in Post …

laravel laravel-4 eloquent paginate laravel-paginate
Laravel Pagination Error -- Call to undefined method stdClass::links()

I developed a laravel application and i want to paginate a view, look my controller. $times=DB::table('timesheets') -&…

mysql laravel-4 eloquent laravel-pagination
Laravel Eloquent polymorphic one-to-one?

I'm trying to setup a polymorphic one-to-one relationship (the polymorphic equivalent of has_one and belongs_to).I've got an …

laravel laravel-4 eloquent polymorphic-associations
Laravel hasManyThrough equivalent: belongsTo relationship through another model

I've got a model, it belongs to another model, that model belongs to a third model, and I want an …

php laravel laravel-4 relationship eloquent
Laravel pivot: Get model from withPivot()

I'm building an application using Laravel 4 but have stumbled across a problem with the pivot tables. I've got a user …

laravel pivot eloquent
Laravel 4 Unique Validation Rules Not Working

need help updating a unique rule in my validation rules. I have a abstract validator that will validate a rules …

php laravel laravel-4 eloquent laravel-validation
Guide me implementing Oauth2 PHP server using thephpleague library

I am using Slim Framework With Eloquent ORM. Trying to implement https://github.com/thephpleague/oauth2-server but I am …

php oauth eloquent slim thephpleague
Laravel collection sortBy not taking effect

I'm trying to combine and sort the results from several db queries. $events = collect(); $downedEvents = EventDowned::where('mission', $missionId) -&…

php laravel laravel-5 eloquent laravel-collection
Laravel 4.1 Eager Loading Nested Relationships with Constraints

I am trying to get Eager-Loading nested relationships, with constraints, to work. Everyone seems to be giving the same example …

laravel-4 eloquent eager-loading
updateOrCreate with increment in laravel

What I am trying to do is to update or insert the row in table. In my case, update looks …

laravel eloquent laravel-5.1 illuminate-container