blacklist modification
This commit is contained in:
@@ -45,12 +45,13 @@ class BlacklistController extends Controller
|
|||||||
if($count === 0) {
|
if($count === 0) {
|
||||||
//Get the character id from the universe end point
|
//Get the character id from the universe end point
|
||||||
$charId = $lookup->CharacterNameToId($request->name);
|
$charId = $lookup->CharacterNameToId($request->name);
|
||||||
|
|
||||||
//Insert the character into the blacklist table
|
//Insert the character into the blacklist table
|
||||||
BlacklistUser::insert([
|
BlacklistUser::insert([
|
||||||
'character_id' => $charId,
|
'character_id' => $charId,
|
||||||
'name' => $request->name,
|
'name' => $request->name,
|
||||||
'reason' => $request->reason,
|
'reason' => $request->reason,
|
||||||
|
'alts' => $request->alts,
|
||||||
'lister_id' => auth()->user()->getId(),
|
'lister_id' => auth()->user()->getId(),
|
||||||
'lister_name' => auth()->user()->getName(),
|
'lister_name' => auth()->user()->getName(),
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -21,5 +21,8 @@ class BlacklistUser extends Model
|
|||||||
'character_id',
|
'character_id',
|
||||||
'name',
|
'name',
|
||||||
'reason',
|
'reason',
|
||||||
|
'alts',
|
||||||
|
'lister_id',
|
||||||
|
'lister_name',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ class CreateBlacklistTable extends Migration
|
|||||||
$table->string('character_id')->unique();
|
$table->string('character_id')->unique();
|
||||||
$table->string('name')->unique();
|
$table->string('name')->unique();
|
||||||
$table->text('reason');
|
$table->text('reason');
|
||||||
|
$table->text('alts');
|
||||||
$table->string('lister_id');
|
$table->string('lister_id');
|
||||||
$table->string('lister_name');
|
$table->string('lister_name');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
<th>Character Id</th>
|
<th>Character Id</th>
|
||||||
<th>Character Name</th>
|
<th>Character Name</th>
|
||||||
<th>Reason</th>
|
<th>Reason</th>
|
||||||
|
<th>Alts</th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach($blacklist as $bl)
|
@foreach($blacklist as $bl)
|
||||||
@@ -19,6 +20,11 @@
|
|||||||
<td>{{ $bl->characer_id }}</td>
|
<td>{{ $bl->characer_id }}</td>
|
||||||
<td>{{ $bl->name }}</td>
|
<td>{{ $bl->name }}</td>
|
||||||
<td>{{ $bl->reason }}</td>
|
<td>{{ $bl->reason }}</td>
|
||||||
|
@if($bl->alts != null)
|
||||||
|
<td>{{ $bl->alts }}</td>
|
||||||
|
@else
|
||||||
|
<td> </td>
|
||||||
|
@endif
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
Reference in New Issue
Block a user