blacklist update to add removal notes

This commit is contained in:
2020-08-30 07:52:11 -05:00
parent a242bffb28
commit 0e6109c09a
5 changed files with 66 additions and 4 deletions

View File

@@ -115,10 +115,15 @@ class BlacklistController extends Controller
'name' => 'required',
]);
//Delete the blacklist character
//Set the character on the blacklist to removed
BlacklistEntity::where([
'entity_name' => $request->name,
])->delete();
])->update([
'validity' => 'Invalid',
'removed_by_id' => auth()->user()->getId(),
'removed_by_name' => auth()->user()->getName(),
'removed_notes' => $request->notes,
]);
//Return the view
return redirect('/blacklist/display')->with('success', 'Character removed from the blacklist.');