See if this helps: https://laracasts.com/discuss/channels/laravel/how-do-i-connect-to-a-mysql-database-over-ssl-with-laravel-53?page=1
You need to point to the ssl cert in the options array of the db connection.
Get rid of the 'encrypt' => 'yes'. That's bad info. It'd use true anyway if it were a real option instead of 'yes'.
It'd look something like:
'mysql' => [
.............
'options' => [
PDO::MYSQL_ATTR_SSL_KEY => '/path/to/client-key.pem',
PDO::MYSQL_ATTR_SSL_CERT => '/path/to/client-cert.pem',
PDO::MYSQL_ATTR_SSL_CA => '/path/to/ca-cert.pem',
],
],