A
A
Alexander Sharomet2016-08-19 16:41:09
Laravel
Alexander Sharomet, 2016-08-19 16:41:09

Why does Laravel 5.2 output hieroglyphs instead of Russian text?

Hello.
Such a problem - when submitting the registration form on the site in laravel , it substitutes characters instead of Cyrillic.
In app.php there is "ru" Russian around
\u041a\u0430\u043a\u0430\u043a\u0435
How to fix this?
Thanks

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Mikhail Osher, 2016-08-19
@miraage

If this is contained in the json response, the JSON_UNESCAPED_UNICODE flag must be added.

A
Alexander Gavva, 2016-08-25
@aprel_co

The database must be in utf8
in config/database.php add

'charset'   => 'utf8',
'collation' => 'utf8_unicode_ci',

A
Alexander Sharomet, 2016-08-25
@sharomet

no.
It was just necessary to write in the model
protected $fillable = [
'fname', 'name', 'email', 'password',
];

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question