Fix: Добавлен $request в use() closure
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
be1ba308c9
commit
729e39bd78
|
|
@ -70,7 +70,7 @@ class QuestionController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DB::transaction(function () use ($test, $validated) {
|
DB::transaction(function () use ($test, $validated, $request) {
|
||||||
$question = $test->questions()->create([
|
$question = $test->questions()->create([
|
||||||
'type' => $validated['type'],
|
'type' => $validated['type'],
|
||||||
'question_text' => $validated['question_text'],
|
'question_text' => $validated['question_text'],
|
||||||
|
|
@ -179,7 +179,7 @@ class QuestionController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DB::transaction(function () use ($question, $validated) {
|
DB::transaction(function () use ($question, $validated, $request) {
|
||||||
$question->update([
|
$question->update([
|
||||||
'type' => $validated['type'],
|
'type' => $validated['type'],
|
||||||
'question_text' => $validated['question_text'],
|
'question_text' => $validated['question_text'],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue