[enter image description here][1]``` public function store(Request $request) {
//Insert data into Student Table
$student = new Student;
$student->name = $request->name;
$student->registration_id = $request->registration_id;
$student->department_name = $request->department_name;
$student->info = $request->info;
$student->save();
return redirect()->route('index');
}
public function update(Request $request, $id) { $student = Student::find($id);
$student->name = $request->name;
$student->registration_id = $request->registration_id;
$student->department_name = $request->department_name;
$student->info = $request->info;
$student->save();
return redirect()->route('index');
}
[1]: https://i.stack.imgur.com/DWtQr.png
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire