According to your tables all you need is to fix this:
Upload::emails()->wherePivot('url', $key)->get(); // no url field on that table!
// change to:
Upload::find($id)->emails()->wherePivot('key', $key)->get();
// or if you want a collection then:
Upload::with(array('emails'=> function ($q) use ($key) {
$qwherePivot('key', $key);
}))->get();
// to fetch only those Upload models that have related email matching given 'key'
Upload::whereHas('emails', function ($q) use ($key) {
$q->where('upload_emails.key', $key);
})->get(); // add the above with(...) method to also load those emails