Goran Siriev Goran Siriev - 1 year ago 64
PHP Question

laravel Mysql Greek letters showing like?

Mysql table
logs Collation is latin1_swedish_ci


<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

This is my Controller

$PDO = DB::connection('mysql')->getPdo();
//$PDO->exec("SET CHARACTER SET 'utf8'"); // i try this Not working ...

$billingStmt = $PDO->prepare("select * from logs");
$usersBills = $billingStmt->fetchAll((\PDO::FETCH_ASSOC));
//header('Content-Type: text/html; charset=utf-8'); // i try this Not working ...
$logs = ($usersBills);

I try to get query from model but no luck
in mysql database characters store like this


In my old php code (No laravel) mysqli everything working fine with GREEK charackters


I changed my MySQL table field from Collation to utf8_unicode_ci