Hello!
You call the save method which throws the exception inside the store method of your controller.
That means that Auth::user()->articles returns null. That is probably because you didn't define the relationship correctly. You are probably missing the return statement insisde the relationship definition.
class User ...
public function articles(){
return $this->hasMany('Article');
// You are missing the return above.
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community