I try to test emails with mailtrap and Laravel 5.4. I get this error:

Type error: Too few arguments to function Illuminate\Support\Manager::createDriver(), 0 passed in C:\Users***\Documents\www\***\backend\vendor\laravel\framework\src\Illuminate\Support\Manager.php on line 88 and exactly 1 expected

I already tried to config:cacheconfig:clearetc.

Here is what php artisan tinkerreturns when I echo env('MAIL_DRIVER')

smtp

Here is my .env file

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io 
MAIL_PORT=2525 
MAIL_USERNAME=*********
MAIL_PASSWORD=*********
MAIL_ENCRYPTION=null

And here is my Mail function:

Mail::send('email.verify', compact('validation_code'), function($message) {
    $message->to(Input::get('email'), Input::get('username'))
        ->subject('Verify your email address');
});



Here is possible solution

Make sure followings are not empty

BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
SESSION_LIFETIME=120
QUEUE_DRIVER=sync