Support the ongoing development of Laravel.io →
posted 2 years ago
Laravel
Last updated 1 year ago.
0

Hey!

You are using div tags for form elements like: <div hidden name="quizId" value="{{ $quiz->id }}"> or <div name="questionId" value="{{ $question->id }}"> which is not a valid form input/element.

Your quizId and questionId fields are empty in the request as they don't exist because of how you use them.

If you do it like <input type="hidden" name="quizId" value="{{ $quiz->id }}"/> and <input type="hidden" name="questionId" value="{{ $question->id }}" /> it should send both IDs to the controller and update your items accordingly.

Last updated 2 years ago.

obaidfarooq liked this reply

1

thanks for answer but it's still don't works other code of mine is correct?

0

Hey!

What doesn't work. Did you get an error? Can you please post your code again and include it in 3 backticks ``` instead of one to make it easier readable.

Thanks!

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Irakli irakli91 Joined 6 Jul 2021

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.