Top "Eloquent" questions

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

Laravel eloquent update record without loading from database

I'm quite new to laravel and I'm trying to update a record from form's input. However I see that to …

php eloquent laravel-5
Eloquent get only one column as an array

How to get only one column as one dimentional array in laravel 5.2 using eloquent? I have tried: $array = Word_relation::…

laravel eloquent laravel-5.2
How to Merge Two Eloquent Collections?

I have a questions table and a tags table. I want to fetch all questions from tags of a given …

php laravel eloquent laravel-collection
Select the first 10 rows - Laravel Eloquent

So far I have the following model: class Listing extends Eloquent { //Class Logic HERE } I want a basic function that …

php orm laravel eloquent
laravel collection to array

I have two models, Post and Comment; many comments belong to a single post. I'm trying to access all comments …

php arrays laravel eloquent
How to access model hasMany Relation with where condition?

I created a model Game using a condition / constraint for a relation as follows: class Game extends Eloquent { // many more …

laravel laravel-4 eloquent
Laravel Eloquent inner join with multiple conditions

I have a question about inner joins with multiple on values. I did build my code like this in laravel. …

php laravel eloquent
Laravel $q->where() between dates

I am trying to get my cron to only get Projects that are due to recur/renew in the next 7 …

php mysql laravel eloquent datetime-format
Laravel 5.2 - Use a String as a Custom Primary Key for Eloquent Table becomes 0

I am trying to use email as my table's primary key, so my eloquent code is- <?php namespace App; …

php mysql laravel laravel-5 eloquent
Laravel, sync() - how to sync an array and also pass additional pivot fields?

Official Laravel documentation has this on sync() function: $user->roles()->sync( array( 1, 2, 3 ) ); You may also associate other …

php laravel pivot eloquent sync