Просмотр файла app/Models/Bookmark.php
<?php
namespace App\Models;
class Bookmark 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 topic()
{
return $this->belongsTo(Topic::class, 'topic_id')->withDefault();
}
}