PHP Artisan Migrate with MAMP and Unix Socket
Try this:
'mysql' => array(
'driver' => 'mysql',
'unix_socket' => getenv('UNIX_SOCKET'),
'host' => getenv('DB_HOST'),
...
),
In .env add
UNIX_SOCKET=/Applications/MAMP/tmp/mysql/mysql.sock
though quite old question, but still can help others. so adding answer.
there is even simple solution. add this to ur .env file
DB_HOST=localhost;unix_socket=/Applications/MAMP/tmp/mysql/mysql.sock