blacklist modification
This commit is contained in:
@@ -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(),
|
||||
]);
|
||||
|
||||
@@ -21,5 +21,8 @@ class BlacklistUser extends Model
|
||||
'character_id',
|
||||
'name',
|
||||
'reason',
|
||||
'alts',
|
||||
'lister_id',
|
||||
'lister_name',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user