Support the ongoing development of Laravel.io →

4,311 Threads

posted 9 years ago

parse another table after belongsToMany result query (Eloquent Laravel)

I have posted in stackoverflow a question, however I did not get any answer. http://stackoverflow.co...

0 Likes
1 Replies
posted 9 years ago

Many-to-Many and Eager loading query

I am new with Laravel, I was able to query Many-to-Many relationships. Where 'template_dynamic' is t...

0 Likes
1 Replies

Seed did not work but migrate work perfectly

Hi friends, I try to make a modular Laravel application. I use "https://github.com/bstrahija/la...

0 Likes
5 Replies

Need to create a override table function?

Illuminate \ Database \ QueryException SQLSTATE[42S22]: Column not found: 1054 Unknown column 'suppl...

0 Likes
1 Replies
posted 9 years ago

Eloquent custom query on construct

Hi, Is there any ability to perform a custom query on my model's initialisation? The reason is, i wa...

0 Likes
5 Replies

eloquent - set value from sql select query

How can I do the following using eloquent? INSERT INTO table (column) VALUES (select max(id) from ta...

0 Likes
1 Replies
posted 9 years ago

Get index of array(with objects inside) where the object's attribute = x

Hi, I have an array with objects called $buildings It has 5 buildings, each with a relation to a &q...

0 Likes
5 Replies
Solved

Eloquent model events not firing when using relations?

I have a typical event hook for soft deleting children: public static function boot() { parent::boo...

0 Likes
1 Replies

Database design with different users

#Dear people and cats. Do anyone have a smart idea of how to design a user table with different user...

0 Likes
2 Replies

Nested relationships when parent is a many-to-many relationship

Hi, I have these three models: Building (table: buildings) Object (table: objects) BuildingType (tab...

quyle92 liked this thread

1 Likes
21 Replies
Solved
posted 9 years ago

Call to undefined method Model::where() - also effects all(), find()

Hey guys, Something very weird has happened in an application that I am building today. All of a sud...

0 Likes
1 Replies

(Laravel 5) Avoid Repetition in Controllers

Hi, I have 3 controllers that basically List/Create/Edit/Remove things in database (Products, Carts,...

0 Likes
2 Replies
Solved

Float - displaying with extra decimal values

I will try to briefly explain this problem I'm having. I have a database field called "price&qu...

0 Likes
3 Replies
Solved

Mysql silently fails when updating relations using sync()

I am posting arrays of related field ids using the product id as the key, to my controller: $input...

0 Likes
1 Replies
Solved

Advice on crating database properties

Hi guys, This question might be more of a generic database design question, but I'm using it for a L...

0 Likes
2 Replies

laravel 4.2 custom observer event

Hi every body. I have a directory under my app folder named observers and I listen for various event...

0 Likes
1 Replies
Solved

multi level eloquent relations

I'm getting super confused with this small part time project I am working on. I have a Movie model,...

0 Likes
3 Replies

paginate bug

Hello, guys! Help me please, sorry for my english :) I have bug with paginate, example: $products =...

0 Likes
2 Replies

Eloquent will also assume that each table has a primary key column named id

Eloquent will also assume that each table has a primary key column named id. So I change it like thi...

0 Likes
4 Replies
Solved
0 Likes
0 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.

© 2024 Laravel.io - All rights reserved.