unicode - Laravel 5.1 utf-8 saving to database -
i'm trying save record database. when value input , save database there no problem, :
$request->input('name') input value of 'سلام'
$provider->name = $request->input('name'); $provider->copyright_email = 'test@yahoo.com'; $provider->save();
but when try give value controller problem appears. name save '?' database :
$provider->name = 'سلام'; $provider->copyright_email = 'test@yahoo.com'; $provider->save();
i've added code config/database.php :
'charset' => 'utf8', 'collation' => 'utf8_persian_ci',
- config database file
utf8_unicode_ci
check file config/database.php
:
'charset' => 'utf8', 'collation' => 'utf8_unicode_ci',
make sure mysql databases set
utf8
, mysql’sutf8mb4
bettermake sure file character set
utf-8 without bom
i think problem in ide, try use atom.
Comments
Post a Comment