How to store emoji string in Database using Laravel with Orm Query -
i want store special char in database vice versa emotive when try save in database question marks.
please
in database.php file, make sure set charset , collation utf8mb4:
'mysql' => [ 'driver' => 'mysql', 'host' => env('db_host', 'localhost'), 'database' => env('db_database', 'forge'), 'username' => env('db_username', 'forge'), 'password' => env('db_password', ''), 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', and emoji column should string:
$table->string('emoji');
Comments
Post a Comment