PHP: class Post extends Model { public $guarded = ['tags']; public $appends = ['datetime', 'tags', 'comments']; protected $hidden = ['created_at', 'updated_at']; protected $dates = ['datetime']; public function getDatetimeAttribute() { return $this->created_at->format('h:i d.m.Y'); } public function getTagsAttribute() { return $this->tags(); } public function getCommentsAttribute() { return $this->comments(); } public function tags() { return $this->hasMany('App\Tag', 'post_id', 'id'); } public function comments() { return $this->hasMany('App\Comment', 'post_id', 'id'); } } tags & posts возвращают пустой массив, данные в базе есть. не отрабатывают $this->tags(). что делать? спасибо. даже если я делаю $this->tags не методом, а свойством, он напишет - Undefined Proprty.