瀏覽代碼

Update Story Model

Daniel Supernault 6 年之前
父節點
當前提交
d7d1303a63
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      app/Story.php

+ 7 - 0
app/Story.php

@@ -6,6 +6,13 @@ use Illuminate\Database\Eloquent\Model;
 
 class Story extends Model
 {
+	protected $visible = ['id'];
+	
+	public function profile()
+	{
+		return $this->belongsTo(Profile::class);
+	}
+
 	public function items()
 	{
 		return $this->hasMany(StoryItem::class);