Answer the question
In order to leave comments, you need to log in
Why is laravel not saving the record?
I parse the api and add it to the database. Accidentally discovered that one of the records is not recorded.
echo $post->text . PHP_EOL;
$created = Post::create([
'text' => $post->text
]);
echo $created->text;
Answer the question
In order to leave comments, you need to log in
Check the Model, maybe there is no field specified in the $fillable property.
Try using comparison for the storage field of such information - utf8mb4_general_ci .
Check the encoding and set the appropriate one for the database or overtake it through iconv
Replace the emoticon with its emoji code (or html) and that's it.
Ilya Khrebet gave a good answer, but if there are problems with transcoding, then you can simply save it in JSON format ( json_encode()
/ json_decode()
)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question