You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
522 B
PHP

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Thread extends Model
{
/**
* Get the creator of the thread.
*/
public function creator() {
return $this->belongsTo('App\User', 'thread_creator_id');
}
/**
* Get the tags for the thread.
*/
public function tags() {
return $this->belongsToMany('App\Tag');
}
/**
* Get the posts for the thread.
*/
public function posts() {
return $this->hasMany('App\Post');
}
}