From cf01254b2b05a85854f898c6dd48d2abeb2af98b Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Fri, 26 Jan 2018 09:44:27 -0600 Subject: [PATCH] Use utf8mb4 as the default character set Will properly support emojis and other multibyte characters being stored. Laravel implemented as default in 5.4: https://github.com/laravel/laravel/commit/9d01389ce3039f483dcc9ed405e02ba49042bfa3 --- config/database.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/database.php b/config/database.php index d35cff934..e8d04bab8 100644 --- a/config/database.php +++ b/config/database.php @@ -59,8 +59,8 @@ return [ 'database' => 'database', 'username' => 'root', 'password' => '', - 'charset' => 'utf8', - 'collation' => 'utf8_unicode_ci', + 'charset' => 'utf8mb4', + 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', ],