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

have you defined the relationship between profile and role models correctly ?

0

yes i have defined it correctly

Here is the code block of User model

public function profile()
{
        return $this->hasOne('App\Profile','user_id');
}

Here is the code block of Profile model

public function user()
{
        return $this->belongsTo('App\User','user_id');
 }
Last updated 8 years ago.
0

so what was the problem cause i have 3 tables all relationship right but i cant do the update i dont know the method how it work all i did was this so far


 public function update(StoreUser $request, User $user){
        $user = User::findOrFail($user);

0

Sign in to participate in this thread!

Eventy

Your banner here too?

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.