skip to Main Content

send entity for controller not working, php laravel 7

in blade template <form action="{{ route('leads.courses.restore', $lead->id) }}" method="POST"> @csrf <button type="submit"> Restore </button> </form> in routes Route::post('leads/courses/{lead}/restore', 'LeadsCoursesController@restore')->name('leads.courses.restore'); in controller public function restore(Lead $lead) { dd("ok"); } but i receive HTTP code 404, if i remove the parameter in…

VIEW QUESTION

Laravel Multiple Record with single query not working

General error: 1364 Field 'challen_student_id' doesn't have a default value (SQL: insert into challens (updated_at, created_at) values (2022-10-04 08:53:41, 2022-10-04 08:53:41)) $students = Student::all('id'); $collection = collect($students)->map(function ($student) use($request) { $collect = collect(['challen_student_id', 'challen_month', 'challen_due_date', 'challen_fine', 'challen_exam_fees', 'challen_status']); return $collect->combine([$student->id,…

VIEW QUESTION
Back To Top
Search