Support the ongoing development of Laravel.io →

4,304 Threads

Error: Using $this when not in object context

Hi, i call this somewhere in the CustomerController(): $results = CustomerModel::getCustomers(); Th...

0 Likes
7 Replies

Dynamic "where" on Eloquent Model

Hello, I'm hoping I can get help with a dilema I ran into. I hope it's something simple. I have a me...

0 Likes
4 Replies
Solved

Storing into database a model that contains multiple models which might be of different type.

Hello guys I have this problem. I have a Form that contains several pages (think a multiple step pol...

0 Likes
3 Replies

Search child relationship

I feel this may be a simple question; but I can't, for the life of me, figure this out. I'm relative...

0 Likes
1 Replies
Solved

getDates() and getDateFormat() conflict

I am saving created_at and updated_at as Unix timestamp in DB. I have overridden my getDateFormat()...

0 Likes
0 Replies
posted 9 years ago

Database model

This is possibly not a real Laravel-question but I'm developing my new site in Laravel. This is the...

0 Likes
5 Replies

Combining Eloquent libraries

Hey guys, I'm having a small problem regarding the combination of multiple eloquent based libraries....

0 Likes
0 Replies

Many to Many Polymorphic relationship catch-all method?

Ok so I have a certifications table which can have many employees or materials. Also the employees a...

0 Likes
3 Replies

migration files from existing tables?

Is there a way to create migration files for existing tables quickly?

0 Likes
1 Replies

Get an user who has specific relationships

Hi. I have a user with countries relationship. (hasMany) user_id 1 country_id 1 user_id 1 country_i...

0 Likes
2 Replies
Solved
posted 9 years ago

Call to undefined method User::save()

Hello everyone. I have a mistake when I run the routes.php with a notice error: Call to undefined me...

0 Likes
7 Replies

Many to Many eager loading strange behaviour

Hello all, I've been struggling with a strange behaviour when trying to load partial information fro...

0 Likes
1 Replies
posted 9 years ago

Modular Models

Hi, is it possible to extend models on the fly? What I want to do is to build a modular application...

0 Likes
7 Replies

Ordering by the count of a related table result

The setup. I have Posts items that users can favourite. I show the count of how many people have fav...

0 Likes
4 Replies
Solved
posted 9 years ago

Class extends multiple classes

It is possible that one class extends two other classes? E.g. i want to extend class User to Eloquen...

0 Likes
3 Replies

Paginate Encrypted Data

My DB is like 2000 records, the info is encrypted, using Crypt in my model... /* NAME*/ public func...

0 Likes
0 Replies
posted 9 years ago

belongsToMany + belongsToMany

A User belongstomany (can have many) Collections. A collection belongstomany users. A collection bel...

0 Likes
0 Replies

use laravel with record locking

I have a multi-tenant DB that I need to manage incrementing invoice numbers per tenant. It's import...

0 Likes
0 Replies

Eloquent relation

Hello ! I have two models, who have a one-to-many relationship. 1 - a company has many initiators 2...

0 Likes
3 Replies
Solved

Lazy loaded relation results in "ErrorException Relationship method must return an object of type Illuminate\Database\Eloquent\Relations\Relation"

My ERD is something like this: ControlForm hasMany FormRows FormRow hasMany FormColumns FormColumns...

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.