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

declare(strict_types=1);

namespace 
AppModels;

use 
IlluminateDatabaseEloquentRelationsBelongsTo;

/**
 * Class Bookmark
 *
 * @property int id
 * @property int user_id
 * @property int topic_id
 * @property int count_posts
 */
class Bookmark extends BaseModel
{
    
/**
     * Indicates if the model should be timestamped.
     */
    
public $timestamps false;

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

    
/**
     * Возвращает топик
     */
    
public function topic(): BelongsTo
    
{
        return 
$this->belongsTo(Topic::class, 'topic_id')->withDefault();
    }
}
Онлайн: 5
Реклама