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', 

  1. config database file utf8_unicode_ci

check file config/database.php :

'charset'   => 'utf8', 'collation' => 'utf8_unicode_ci', 
  1. make sure mysql databases set utf8 , mysql’s utf8mb4 better

  2. make sure file character set utf-8 without bom

i think problem in ide, try use atom.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -