2020-06-26 23:32:33 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
class Comment extends Model
|
|
|
|
{
|
2020-10-21 00:29:50 +00:00
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
protected $fillable = [
|
|
|
|
'authorID',
|
|
|
|
'applicationID',
|
2020-10-21 00:29:50 +00:00
|
|
|
'text'
|
2020-06-26 23:32:33 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
public function application()
|
|
|
|
{
|
|
|
|
return $this->belongsTo('App\Application', 'applicationID', 'id');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function user()
|
|
|
|
{
|
|
|
|
return $this->belongsTo('App\User', 'authorID', 'id');
|
|
|
|
}
|
2020-10-21 00:29:50 +00:00
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
}
|