FabCol FabCol
13

belongsToMany, pivot table and multiple condition

Hi All, I'm suffering. Not (yet a master at eloquent lol). I have: One table: messageTopics One table: users A belongsToMany relation between both. In table m...
Eloquent
13
1725
Colin_Laws Colin_Laws
1

Access Multiple Relationships On A Pivot Model Through A Model Using That Relationship

takes a deep breath yes, it's a lengthy title, I apologize! I have a pivot table that joins three tables together: Users, Accounts, and Permissions....
Laravel
1
359
Constantinff Constantinff
3

BelongsToMany using Pivot class and multiple db connections

I have two models: Article belonngsToMany Images and the relations looks like that return $this->belongsToMany(Image::...
oliver_s oliver_s
10

update / sync pivot table with multiple primary keys

Hello, i have a problem to handle pivot table with more than 2 primary keys. I have three tables: posts users post_user...
Eloquent
10
2614

Inserting into multiple models and a pivot table

I'm trying to create a basic thesaurus. I have a words table, an alternatives table and a alternative_word pivot table. I have a Word model and an Alternative model...
olimorris olimorris
8

Eloquent attach() method for multiple inserts into a pivot table

So following on the excellent Laravel 5 Fundamentals series here at Laracasts. I have been inspired to add tags to my many jobs which I post up on my website. However, I le...
Eloquent
8
8311
Colin_Laws Colin_Laws
0

How can I access multiple objects from one pivot relationship given two related entities?

To define what I'm trying to achieve, I'll first start off by defining the four tables I am interacting with: Users, Accounts, AccountUsers, and Permissions. Users m...
olimorris olimorris
5

Laravel Eloquent - How to query pivot tables with multiple relationships

Using Laravel 5, I have a database consisting of users, jobs, conversations and messages, joined by a pivot table between the users and conversations which is called "...
Eloquent
5
1783
simondavies simondavies
4

To pivot or not, for multiple relationships [L5.2]

A simple one me thinks anyones. i have the following Tables: Pages Images Articles PAGES Table: A row with in this table has one...
Colin_Laws Colin_Laws
5

How do you add to a pivot table that has multiple relationships?

I have a pivot table by the name of account_user_permissions that joins the accounts, users, and permissions tables together. I have already set up a custom pi...
michapietsch michapietsch
0

Delete from pivot table only one of multiple associations

Hi, I wasn't able to find an existing thread. Please point me to it if you know of one! Imagine you have multiple associations in a many-to-many relationship....
Create a New Discussion Button