Formatting fixes and cleanup.
This commit is contained in:
parent
a1e14a3e60
commit
51fb71e469
41 changed files with 394 additions and 392 deletions
|
|
@ -47,7 +47,7 @@ Artisan::command('character:edit {id} {name}', function ($id, $name) {
|
|||
})->purpose('Edit a character');
|
||||
|
||||
Artisan::command('character:list {--trashed}', function ($trashed) {
|
||||
$cols = ['id', 'name' ];
|
||||
$cols = ['id', 'name'];
|
||||
if ($trashed) {
|
||||
$cols[] = 'deleted_at';
|
||||
$q = Character::onlyTrashed();
|
||||
|
|
@ -83,7 +83,7 @@ Artisan::command('raid:add {name}', function ($name) {
|
|||
Artisan::command('raid:edit {id} {name}', function ($id, $name) {
|
||||
|
||||
$raid = Raid::find($id);
|
||||
if (!$raid ) {
|
||||
if (!$raid) {
|
||||
$this->warn("Could not find raid.");
|
||||
return;
|
||||
}
|
||||
|
|
@ -95,7 +95,7 @@ Artisan::command('raid:edit {id} {name}', function ($id, $name) {
|
|||
})->purpose('Edit a raid');
|
||||
|
||||
Artisan::command('raid:list {--trashed}', function ($trashed) {
|
||||
$cols = ['id', 'name' ];
|
||||
$cols = ['id', 'name'];
|
||||
if ($trashed) {
|
||||
$cols[] = 'deleted_at';
|
||||
$q = Raid::onlyTrashed();
|
||||
|
|
@ -120,9 +120,9 @@ Artisan::command('raid:delete {id}', function ($id) {
|
|||
// Cards
|
||||
// --------------------------
|
||||
|
||||
Artisan::command('card:add {body} {--column=} {--value=}', function ($body, $column=null, $value=null) {
|
||||
Artisan::command('card:add {body} {--column=} {--value=}', function ($body, $column = null, $value = null) {
|
||||
|
||||
$data = [ 'body' => $body ];
|
||||
$data = ['body' => $body];
|
||||
|
||||
if ($value && !in_array($column, ['character_id', 'raid_id', 'class', 'role'])) {
|
||||
$this->warn(sprintf("Invalid column '%s'", $column));
|
||||
|
|
@ -137,7 +137,7 @@ Artisan::command('card:add {body} {--column=} {--value=}', function ($body, $col
|
|||
$this->info("Created card");
|
||||
})->purpose('Create a new card');
|
||||
|
||||
Artisan::command('card:edit {id} {--body=} {--column=} {--value=}', function ($id, $body=null, $column=null, $value=null) {
|
||||
Artisan::command('card:edit {id} {--body=} {--column=} {--value=}', function ($id, $body = null, $column = null, $value = null) {
|
||||
|
||||
$card = Card::find($id);
|
||||
|
||||
|
|
@ -164,7 +164,7 @@ Artisan::command('card:edit {id} {--body=} {--column=} {--value=}', function ($i
|
|||
})->purpose('Update a card');
|
||||
|
||||
Artisan::command('card:list {--trashed}', function ($trashed) {
|
||||
$cols = [ 'id', 'character_id', 'raid_id', 'role', 'class', 'body' ];
|
||||
$cols = ['id', 'character_id', 'raid_id', 'role', 'class', 'body'];
|
||||
$q = Card::query();
|
||||
if ($trashed) {
|
||||
$cols[] = 'deleted_at';
|
||||
|
|
@ -197,7 +197,7 @@ Artisan::command('admin:add {username} {password}', function ($username, $passwo
|
|||
$this->info("Created admin user");
|
||||
})->purpose('Add a admin user');
|
||||
|
||||
Artisan::command('admin:edit {id} {--username=} {--password=}', function ($id, $username=null, $password=null) {
|
||||
Artisan::command('admin:edit {id} {--username=} {--password=}', function ($id, $username = null, $password = null) {
|
||||
|
||||
$admin = Admin::find($id);
|
||||
if (!$admin) {
|
||||
|
|
@ -228,8 +228,8 @@ Artisan::command('admin:delete {id}', function ($id) {
|
|||
})->purpose('Delete a admin user');
|
||||
|
||||
Artisan::command('admin:list', function () {
|
||||
$cols = ['id', 'username', 'password', 'created_at', 'updated_at' ];
|
||||
$cols = ['id', 'username', 'password', 'created_at', 'updated_at'];
|
||||
$q = Admin::query();
|
||||
$data = $q->select($cols)->get()->makeVisible('password');
|
||||
$this->table($cols, $data);
|
||||
})->purpose('list admin users');
|
||||
})->purpose('list admin users');
|
||||
|
|
|
|||
Reference in a new issue