I am using Laravel 5.1 and mysql server. I have a database with a table in unicode utf8, and my database configuration file looks like this:
'mysql' => array(
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'database',
'username' => 'root',
'password' => 'password',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => 'false',
),
But when I use requests from the eloquent, my accented texts are violated. This is not a problem with the blade, because I can correctly write accent in the views, and if I use PDO directly, my text will be pleasant.
How can I solve my problem with my eloquent requests?
source
share