fix marking bug - when typing chinese

This commit is contained in:
Jack Goh
2018-08-13 12:07:15 +08:00
parent 148f771098
commit 796e8bf6df
4 changed files with 9 additions and 17 deletions
+5 -1
View File
@@ -19,13 +19,17 @@ class MarkingController extends Controller
public function store(Request $request)
{
$marking = Marking::create($request->all());
$marking = new Marking;
$marking->marking = strtoupper($request->input('marking'));
$marking->email = $request->input('email');
$marking->save();
return response()->json($marking, 201);
}
public function update(Request $request, Marking $marking)
{
// TODO : update to upper case
$marking->update($request->all());
return response()->json($marking, 200);