Fixed undefined variable 'file' error

From dwolf555/laravel-github-issue@74af7e6de9f6ef0aacd6336729b86ce986d4f1aa