have you defined the relationship between profile and role models correctly ?
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');
}
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);
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community