// User model
public function phone()
{
return $this->hasOne(Phone::class);
}
// User controller
$phone = User::find(1)->phone;
Doctor::has('DoctorMessage')->with('DoctorMessage')->get()
use AppModelsPost;
// Retrieve all posts that have at least one comment...
$posts = Post::has('comments')->get();