I'm having the following error : SQLSTATE[22023]: Invalid parameter value: 7 ERROR: invalid value for parameter "client_encoding": "utf8mb4" (SQL: select exists(select * from "oauth_personal_access_clients") as "exists")
$token = Auth::user()->createToken('api')->accessToken;
Of course, i'm using heroku with pgsql, and my db configuration =>
'default' => env('DB_CONNECTION', 'pgsql'),
'pgsql' => [
'driver' => 'pgsql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
'schema' => 'public',
'sslmode' => 'prefer',
],
The database works fine, except for this case.
utf8
but your inserted field charset isutf8mb4
may be you edit recently, then reboot your server