[5.0] Replace last() with end() to remove Illuminate\Support requirement for Illuminate\Container

Unless you have good reason for this I don't think `Illuminate/Container` should depend on a single function from `Illuminate\Support` which is essentially a proxy to the `end` function.