Upload delete files #1804
Unanswered
dv3xxx-git
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I have a problem with the downloaded files.
I can't delete files because of this error, it seems that I did everything according to the documentation.
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (
example_app.
attachmentable, CONSTRAINT
attachmentable_attachment_id_foreignFOREIGN KEY (
attachment_id) REFERENCES
attachments(
id) ON DELETE CASCADE ON UPDATE CASCADE) (SQL: insert into
attachmentable(
attachment_id,
attachmentable_id,
attachmentable_type) values (75, 1, App\Models\ApiUser))
My update method:
` public function createOrUpdate(ApiUser $api_user, Request $request)
{
$api_user->fill($user)->save();
Beta Was this translation helpful? Give feedback.
All reactions