Pārlūkot izejas kodu

Update StatusHashtag model

Daniel Supernault 6 gadi atpakaļ
vecāks
revīzija
348ff3123e
1 mainītis faili ar 10 papildinājumiem un 0 dzēšanām
  1. 10 0
      app/StatusHashtag.php

+ 10 - 0
app/StatusHashtag.php

@@ -7,4 +7,14 @@ use Illuminate\Database\Eloquent\Model;
 class StatusHashtag extends Model
 {
     public $fillable = ['status_id', 'hashtag_id'];
+
+	public function status()
+	{
+		return $this->belongsTo(Status::class);
+	}
+
+	public function hashtag()
+	{
+		return $this->belongsTo(Hashtag::class);
+	}
 }