View file app/Models/Transfer.php

File size: 522B
<?php

namespace App\Models;

class Transfer 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 recipientUser()
    {
        return $this->belongsTo(User::class, 'recipient_id')->withDefault();
    }
}