Fix compatibility with latest Laravel