blacklist updates

This commit is contained in:
2020-12-04 06:57:20 -06:00
parent 3f5ce7dbf4
commit 69d92960d9

View File

@@ -83,19 +83,17 @@ class BlacklistController extends Controller
return redirect('/blacklist/display/add')->with('error', 'Entity Id was not found.'); return redirect('/blacklist/display/add')->with('error', 'Entity Id was not found.');
} }
//Store the entity in the table //Store the entity in the table
BlacklistEntity::insert([ $blacklist = new BlacklistEntity;
'entity_id' => $entityId, $blacklist->entity_id = $entityId;
'entity_name' => $request->name, $blacklist->entity_name = $request->name;
'entity_type' => $request->type, $blacklist->entity_type = $request->type;
'reason' => $request->reason, $blacklist->reason = $request->reason;
'alts' => $request->alts, $blacklist->alts = $request->alts;
'lister_id' => auth()->user()->getId(), $blacklist->lister_id = auth()->user()->getId();
'lister_name' => auth()->user()->getName(), $blacklist->lister_name = auth()->user()->getName();
'validity' => 'Valid', $blacklist->validity = 'Valid';
]); $blacklist->save();
//Return to the view //Return to the view
return redirect('/blacklist/display/add')->with('success', $request->name . ' added to the blacklist.'); return redirect('/blacklist/display/add')->with('success', $request->name . ' added to the blacklist.');