Support the ongoing development of Laravel.io →

4,312 Threads

posted 10 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 10 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 10 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

Using a variable in join function

Hi, I need to perfom a query which includes a join on multiple conditions. Therefore, I try to do th...

0 Likes
4 Replies
Solved

In-query check or code check

Hey, Quick question here! I don't really know what are the best practices on that subject, so I'll l...

0 Likes
4 Replies
Solved

Best way of using model event and eloquent guard

I currently have a form with 3 dropdown menu which allow a user to select his date of birth by day,...

0 Likes
0 Replies

Get array from browser url.

Hello all, Can anyone please send me a bit of code to get array from url? Suppose this is my url :...

0 Likes
3 Replies
Solved

[Package] Eloquent-Typecast

Hey all. Got a little package here to help cast Eloquent model's attributes to the proper PHP varia...

0 Likes
1 Replies
posted 10 years ago

Return records only if id exists in another table

Hello, I have a table "names" like this: names: id | name and a table "bookmark"...

0 Likes
2 Replies

Model validation with traits

I wrote a blog post here which explains how you can take Dayle Ree's model validation code and turn...

0 Likes
3 Replies

Pivot Table relationship

I am having problems with creating a schema / model for one of my projects and would like to get som...

0 Likes
3 Replies
posted 10 years ago

Eloquent query not working

Hey guys, This is probably super trivial, but here goes: I'm following one of Jeffrey Ways great tut...

0 Likes
2 Replies
Solved

Admin filter question

Hello :) I'm making an admin filter to use in the routes. filters.php Route::filter('auth.admin', fu...

0 Likes
1 Replies
Solved
posted 10 years ago

Creating a model called "Event" that extends Eloquents gives me an error. Help?

I have a database table called "events" that holds wedding/exhibition events. I'm using El...

0 Likes
2 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.