blacklist modification

This commit is contained in:
2019-12-01 02:10:33 -06:00
parent 0f59440ce4
commit 5f6c8f4085
4 changed files with 12 additions and 1 deletions

View File

@@ -45,12 +45,13 @@ 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(),
]);

View File

@@ -21,5 +21,8 @@ class BlacklistUser extends Model
'character_id',
'name',
'reason',
'alts',
'lister_id',
'lister_name',
];
}

View File

@@ -19,6 +19,7 @@ class CreateBlacklistTable extends Migration
$table->string('character_id')->unique();
$table->string('name')->unique();
$table->text('reason');
$table->text('alts');
$table->string('lister_id');
$table->string('lister_name');
$table->timestamps();

View File

@@ -12,6 +12,7 @@
<th>Character Id</th>
<th>Character Name</th>
<th>Reason</th>
<th>Alts</th>
</thead>
<tbody>
@foreach($blacklist as $bl)
@@ -19,6 +20,11 @@
<td>{{ $bl->characer_id }}</td>
<td>{{ $bl->name }}</td>
<td>{{ $bl->reason }}</td>
@if($bl->alts != null)
<td>{{ $bl->alts }}</td>
@else
<td> </td>
@endif
</tr>
@endforeach
</tbody>