class Event extends Model {
protected $table = 'events';
public $timestamps = false;
public function participants()
{
return $this->hasMany('AppParticipant', 'IDEvent', 'ID');
}
public function owner()
{
return $this->hasOne('AppUser', 'ID', 'IDOwner');
}
}