I would simplify that query by just doing:
$latestInvoiceNr = Invoice::where('sender_type', $recipient_type)
->where('sender_id', $recipient_id)
->max('invoice_nr')
This way you automatically get the max NR and can just do: $latestInvoiceNr + 1
I think this should work.
Edit: In your case, since you want to start with 1500 I would probably do:
if($latestInvoiceNr){
return $latestInvoiceNr + 1;
} else {
return 1500;
}