Files
snipe-it/app/models/Comment.php
T
2013-11-13 01:59:39 -05:00

36 lines
445 B
PHP
Executable File

<?php
class Comment extends Eloquent {
/**
* Get the comment's content.
*
* @return string
*/
public function content()
{
return nl2br($this->content);
}
/**
* Get the comment's author.
*
* @return User
*/
public function author()
{
return $this->belongsTo('User', 'user_id');
}
/**
* Get the comment's post's.
*
* @return Blog\Post
*/
public function post()
{
return $this->belongsTo('Post');
}
}