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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

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

android - How to create dynamically Fragment pager adapter -