2018-09-17 14:15:06 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
class PhotoComment extends Model
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The attributes that are mass assignable.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $fillable = [
|
|
|
|
'commentor_name',
|
|
|
|
'commentor_email',
|
|
|
|
'comment_text'
|
|
|
|
];
|
2018-09-17 22:30:27 +01:00
|
|
|
|
|
|
|
public function approvedBy()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(User::class, 'approved_user_id');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function createdBy()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(User::class, 'created_user_id');
|
|
|
|
}
|
2018-09-17 14:15:06 +01:00
|
|
|
}
|