message
This commit is contained in:
@@ -57,16 +57,21 @@ class BlacklistController extends Controller
|
||||
if($count === 0) {
|
||||
//Get the character id from the universe end point
|
||||
$charId = $lookup->CharacterNameToId($request->name);
|
||||
|
||||
//Insert the character into the blacklist table
|
||||
BlacklistUser::insert([
|
||||
'character_id' => $charId,
|
||||
'name' => $request->name,
|
||||
'reason' => $request->reason,
|
||||
'alts' => $request->alts,
|
||||
'lister_id' => auth()->user()->getId(),
|
||||
'lister_name' => auth()->user()->getName(),
|
||||
]);
|
||||
|
||||
if($charId != -1) {
|
||||
//Insert the character into the blacklist table
|
||||
BlacklistUser::insert([
|
||||
'character_id' => $charId,
|
||||
'name' => $request->name,
|
||||
'reason' => $request->reason,
|
||||
'alts' => $request->alts,
|
||||
'lister_id' => auth()->user()->getId(),
|
||||
'lister_name' => auth()->user()->getName(),
|
||||
]);
|
||||
} else {
|
||||
//Redirect back to the view
|
||||
return redirect('/blacklist/display/add')->with('error', $request->name . ' has been biomassed.');
|
||||
}
|
||||
} else {
|
||||
//Return the view
|
||||
return view('blacklist.add')->with('error', 'Character is already on the black list.');
|
||||
|
||||
Reference in New Issue
Block a user