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

View file

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