Modified for Laravel 5