Support the ongoing development of Laravel.io →

3,323 Threads

How can I cache all data in Eloquent

How can I try to using cache for all of Eloquent query. Example: $users = User::remember(10)->get...

0 Likes
1 Replies
posted 11 years ago

Mass assignment User::create() undefined and $user->save() undefined ?

Hello everyone! I have a little problem to register a user. Here is the function that processes the...

0 Likes
0 Replies
posted 11 years ago

getting model belongsTo attributes

class Batch extends Eloquent { public function coupons() { return $this->hasMany('Cou...

0 Likes
1 Replies

whereNotIn Query replacing my array variables

Hello All, So I have some weirdness happening. I'm trying to do a search on a track database that I...

0 Likes
2 Replies

Delete quotes in query to execute

I need to execute a query with group by. But the group by is not for a field. I need to group by wit...

0 Likes
0 Replies
posted 11 years ago

4 table join together

I have 4 tables TableA hasMany TableC TableB hasMany TableC TableC hasMany TableD I want to connect...

0 Likes
2 Replies

Composite primary key

Hi ! I read that L3 didn't support composite primary key, is it the same for L4.1 ? In my case it's...

0 Likes
2 Replies

Getting a data from model & use in controller

In relationship from the questions I have ask previously, Question 1: Inserting selected fields from...

0 Likes
9 Replies

Children Models

I would like to have the following models: Employee, Agent, Client. Since half of all the fields and...

0 Likes
3 Replies

Master-Detail

good morning, someone who can help me, I need to create a route between father son model to model, l...

0 Likes
2 Replies

Error Trying to get property of non-object

I am struggling to understand how laravel works and I have a very difficult time with it Model - Use...

0 Likes
1 Replies

Pagination with custom variable

Hi again. I have 3 tabs in a page. I have 3 queries and thus get the results and make 3 different pa...

0 Likes
1 Replies

Retrieving Translated Field from Pivot Table

Hello, one of the requirements on the application I am developing is to have it to use an arbitrary...

0 Likes
0 Replies

How to handle relations between table in forms?

Hi, I've been looking for examples for a while and found out that the docs are lacking about this. H...

0 Likes
3 Replies

Conflict in Unique Column Name - Join Statement Query Builder

DB::table('users') ->join('contacts', function($join) { $join->on('users.id', '=', 'contacts.u...

0 Likes
1 Replies

Help getting data from my Database

I have two models with relationship: City and Events. In the controller i have this: $cities = City:...

0 Likes
1 Replies

Insert One to Many with multiple records

Hi there, I would like to insert a post and its images with laravels ORM. Posts title tekst Images...

0 Likes
3 Replies

Eloquent - select single value from database

Hi all, I'm creating a drop down list that gets populated using data from a database. Everything wor...

0 Likes
3 Replies
posted 11 years ago

Dynamic model appends

Hello. I'm looking for a way to create dynamic appends to a model. right now i have something like p...

0 Likes
0 Replies

Eloquent has no handling with malicious data??

I did a simple query like: $query = "sdsad'sa"; Spot::where('title', 'like', '%'.$query.'%...

0 Likes
8 Replies

Thanks to our community

Solutions given in the past year. Excluding solutions from thread authors.

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.