Вход Регистрация
Файл: app/Models/Comment.php
Строк: 25
<?php

declare(strict_types=1);

namespace 
AppModels;

use 
IlluminateDatabaseEloquentRelationsMorphTo;

/**
 * Class Comment
 *
 * @property int id
 * @property int user_id
 * @property string relate_type
 * @property int relate_id
 * @property string text
 * @property string ip
 * @property string brow
 * @property int created_at
 */
class Comment extends BaseModel
{
    
/**
     * Indicates if the model should be timestamped.
     */
    
public $timestamps false;

    
/**
     * The attributes that aren't mass assignable.
     */
    
protected $guarded = [];

    
/**
     * Morph name
     */
    
public static string $morphName 'comments';

    
/**
     * Возвращает связанные объекты
     */
    
public function relate(): MorphTo
    
{
        return 
$this->morphTo('relate');
    }
}
Онлайн: 3
Реклама