Allow cache to be resolved through a Closure like the paginator. Fixes dependency issues, currently you must include Illuminate\Cache\Manager to resolve through IoC or mockery. Fixed now.

Signed-off-by: Ben Corlett <bencorlett@me.com>
Tweak docblock typehints.

Signed-off-by: Ben Corlett <bencorlett@me.com>
When Exception occurs, return also the exception code not only a message.

If we don't return any exception code, or return always 0,  programmer have to parse a exception message. It's not a developer friendly approach.
Add license to composer files.
Merge pull request #1427 from devmach/patch-2

When Exception occurs, return also the exception code not only a message...
Cleaning up code.
Check where count before merging nested wheres. Fixes #1338.