public function devices()
{
$this->hasMany(DeviceAudience::class);
}
public function devices() {
return $this->belongsToMany('App\Models\Device',
'device_audiences',
'audience_id',
'device_id')->withPivot('amount');
}
$devices = Audience::find($id)->devices;