View file app/Models/Contact.php
<?php namespace App\Models; class Contact extends BaseModel { /** * Indicates if the model should be timestamped. * * @var bool */ public $timestamps = false; /** * The attributes that aren't mass assignable. * * @var array */ protected $guarded = []; /** * Возвращает связь пользователей */ public function contactor() { return $this->belongsTo(User::class, 'contact_id')->withDefault(); } }