Support the ongoing development of Laravel.io →
Database Eloquent Architecture
Last updated 2 years ago.
0

You don't need the ProjectUsers model.

Watch this video.

// User model
public function projects()
{
    return $this->belongsToMany('User');
}

// Project model
public function users()
{
    return $this->belongsToMany('User');
}
Last updated 2 years ago.
0

@pogachar, Thanks that worked I needed to tweak some of the naming so the right tables were selected but it worked!!! Thanks again!

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

godoploid godoploid Joined 12 Oct 2014

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.