You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Has anyone experienced this error? When creating a post with an image, all my information is validated except for the image, which goes to the database as null. I use Laravel 11, I followed the installation according to the documentation to the letter, I have already reviewed my Model and controller methods, but I have researched everything and I cannot get it to work to import my image to the database.
Body
{
"_token": "pokswyKAi4SkvLrmqZpHZ0FE3AohU6tcI6Y2reTV",
"title": "Creating a Test",
"tags": "Creating a Test",
"active": "on",
"category_id": "2",
"paragraph": "Creating a Testy",
"long_content": "Creating a Test",
"image": {}
}
`SQLSTATE[HY000]: General error: 1364 Field 'image' doesn't have a default value (Connection: mysql, SQL: insert into `blogs` (`category_id`, `title`, `slug`, `tags`, `paragraph`, `long_content`, `featured`, `active`, `updated_at`, `created_at`) values (2, Creating a Test, Creating a Test, Creating a Test, Creating a Test, <h1> Creating a Test</h1>, 0, 0, 2024-08-18 18:12:35, 2024-08-18 18:12:35))`
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Has anyone experienced this error? When creating a post with an image, all my information is validated except for the image, which goes to the database as null. I use Laravel 11, I followed the installation according to the documentation to the letter, I have already reviewed my Model and controller methods, but I have researched everything and I cannot get it to work to import my image to the database.
Body
Beta Was this translation helpful? Give feedback.
All reactions