I had a look at the eloquent relationship https://laravel.com/docs/5.2/eloquent-relationships#one-to-one.
My question is: Is there a difference between switching hasOne and belongsTo?
Laravel Docs:
public function phone()
{
return $this->hasOne('App\Phone');
}
public function user()
{
return $this->belongsTo('App\User');
}
can I swap the methods like:
public function phone()
{
return $this->belongsTo('App\Phone');
}
public function user()
{
return $this->hasOne('App\User');
}