[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
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2K2GelX
via IFTTT
Aucun commentaire:
Enregistrer un commentaire