Просмотр файла app/Models/Ignore.php

Размер файла: 634B
<?php

namespace App\Models;

class Ignore extends BaseModel
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'ignoring';

    /**
     * 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 ignoring()
    {
        return $this->belongsTo(User::class, 'ignore_id')->withDefault();
    }
}