I have two models I am trying to create a one to one relationship for: A Week model and WeekType model. The WeekType belongs to Week, and should be a one to one relationship.. however, Laravel is returning null on a
dd(Week::find($id)->weektpye);
Here are my models:
Week.php
public function weekTypes()
{
return $this -> hasOne('App\WeekType');
}
WeekType.php
public function weeks()
{
return $this -> belongsTo('App\Week');
}
And my schema:
I feel I'm missing something obvious or my schema is incorrectly configured, though I'm not sure how.