Support the ongoing development of Laravel.io →

988 Threads

Laravel bug or my mistake?

Good night, In this code, i got an error that says that the variable userId doesn't exists when its...

0 Likes
2 Replies
Solved

Bulk insertions on db table

Hi, I have to insert in a table something like 18000 records. I didn't try to use Eloquent, but usin...

0 Likes
7 Replies
Solved

Load Eloquent from Main View

I'm just in my first laravel project. It has a small blog and uses notifications just like a social...

0 Likes
7 Replies
Solved

one-to-many relationship without actual foreign key in database

I want to mak a one-to-many relationship like in the tutorial. One To Many An example of a one-to-m...

0 Likes
1 Replies
Solved

SQL where in Eloquent

i realize the question sounds very rudimentary, but coming in from the front end side of development...

0 Likes
2 Replies
Solved

Trying to understand Migration workflow

At this point I have two files in my migration folder, one to create the table with its columns, and...

0 Likes
3 Replies
Solved
posted 10 years ago

Inserting a related model and missing FK

I have set up two models: User and Survey and defined their relationship in the model. One user may...

0 Likes
5 Replies
Solved

Many To Many Polymorphic Relationship?

Hey guys, I'm trying to figure out if this is the best way to go about this. I have a tv_shows table...

0 Likes
8 Replies
Solved

Use avg() in eloquent for OrderBy

Hi ! I have a lists on articles that I get from a simple Eloquent query Article::where('state', '=',...

0 Likes
4 Replies
Solved

Problem of model functions since the last composer update

Hi, I have update the composer.phar today, and since that, all the methods in the model files don't...

0 Likes
8 Replies
Solved

Using a relationship query on one table that has two columns to match?

I have two tables. One is People. The second is Files. Files contains all uploaded files through an...

0 Likes
3 Replies
Solved
posted 10 years ago

The variable loses its value inside the SQL query in Eloquent (a matter of scope)

Hello and good day to everyone The issue is tricky (for me). I passed the parameter value from the c...

0 Likes
15 Replies
Solved
posted 10 years ago

Checking if object is related in many-to-many

I have a Post model with the following function: public function tags() { return $this->belongs...

0 Likes
1 Replies
Solved

Laravel Quickstart: Class 'User' not found

Dear Laravel Users, I just got to know a few days ago about Laravel (=> I'm a "stupid starte...

0 Likes
5 Replies
Solved

Model attribute accessor not working with object_get helper function

The model: class Item extends Eloquent { public function getCentsAttribute() { return substr(...

0 Likes
3 Replies
Solved

How to reference this object's "belongsTo" user?

In my Car class I have public function user() { return $this->belongsTo('User'); } public fu...

0 Likes
9 Replies
Solved
posted 10 years ago

How to perform a tag search ?

Hi, Given this simple database setup: posts - id tags - id post_tag - id - post_id - tag_id ......

0 Likes
4 Replies
Solved

HipHop (and / or NGINX) and Saving new Records

Hi there, This was a different thread, but incorrectly titled. Anyway, here's the problem: On our d...

0 Likes
3 Replies
Solved
posted 10 years ago

Cannot call a function from model

Hi, I am new to laravel and this is pretty basic problem (I think) but for some reason I can't get m...

0 Likes
3 Replies
Solved
posted 10 years ago

Custom methods

Hi, is there any way to add custom methods to eloquent models? e.g.: class User extends Eloquent {...

0 Likes
5 Replies
Solved

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.

© 2024 Laravel.io - All rights reserved.