1
0
Fork 0

Update Activity model

This commit is contained in:
Daniel Supernault 2019-02-03 14:47:15 -07:00
parent 01c7a95ef5
commit 884f675d30
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 10 additions and 0 deletions

View File

@ -7,4 +7,14 @@ use Illuminate\Database\Eloquent\Model;
class Activity extends Model
{
protected $dates = ['processed_at'];
public function toProfile()
{
return $this->belongsTo(Profile::class, 'to_id');
}
public function fromProfile()
{
return $this->belongsTo(Profile::class, 'from_id');
}
}