The Eloquent ORM included with Laravel provides a beautiful, simple ActiveRecord implementation for working with your database.
I have two models, User and Training, with Many to many relationship between them. I'm using the Laravel Datatables package …
php laravel datatables eloquent laravel-datatablesI have a model like this: <?php class Post extends Eloquent { protected $fillable = []; public function photos() { return $this->…
php laravel eloquent polymorphic-associationsif I have an Eloquent Model called Post, and the mysql table has: integer ID, string Text How do I …
laravel eloquent model-bindingI've created two classes extending Eloquent (contacts and tags), they have a ManyToMany relationship. I'm trying to create the method …
laravel-5 eloquent many-to-many laravel-5.1 detachI have two models, User and Event. I made a pivot table, invitations between User and Event with a status …
laravel eloquent lumenCurrently I have a model class named Post. class Post extends Eloquent { protected $table = 'posts'; protected $fillable = array('user_id', …
mysql inheritance laravel eloquent subclassIn my project I have many Eloquent models that have eager relations configured in class like this: protected $with = [ 'countries', …
laravel eloquent eager-loadingI have three models that relate to each other one to many: Country class Country extends Model { protected $fillable=['name',…
laravel eloquent laravel-eventsSo i had a seeder for Languages Table (LanguageTableSeeder) as follows: DB::table('languages')->insert([ 'name' => 'English', …
laravel eloquent laravel-5.4 laravel-seedingIs it possible to use 'limit' parameter in paginate() function? I'm trying this: $users->where(...)->limit(50)-&…
laravel eloquent laravel-query-builder laravel-pagination