Explorar o código

Update Story Model

Daniel Supernault %!s(int64=6) %!d(string=hai) anos
pai
achega
d7d1303a63
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  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);