Saving emojies in Laravel MySQL database

Submitted by tuytoosh - 2 years ago

Laravel MySQL in default returns "SQLSTATE[HY000]: General error: 1366 Incorrect string value" error in emoji save... this error is because Laravel in default uses utf8 charset in MySQL, change your `config/database.php` like below and reset your migration instead putting out that error...

'mysql' => [
    'driver' => 'mysql',
    'charset' => 'utf8mb4',
    'collation' => 'utf8mb4_unicode_ci',
comments powered by Disqus