Skip to content
This repository has been archived by the owner on Dec 28, 2022. It is now read-only.

Commit

Permalink
fix command issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ansezz committed Apr 5, 2020
1 parent fc044bd commit 1828747
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Console/MakeBadgeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,16 @@ public function handle()
if ($this->confirm('Do you wanna create database record ?')) {
$name = $this->ask('Badge name?');
$description = $this->ask('Badge description?');
$group = $this->ask('Badge Group?')->default(config('gamify.badge_default_level'));;
$level = $this->ask('Badge Level?');
$group = $this->ask('Badge Group?');
$level = $this->choice('Badge Level?', config('gamify.badge_levels'));

$group = GamifyGroup::firstOrCreate(['name' => $group, 'type' => 'badge']);

Badge::create([
'name' => $name,
'description' => $description,
'level' => $level,
'gamify_group_id' => $group->id,
'level' => config('gamify.badge_levels')[$level],
'class' => $this->qualifyClass($this->argument('name')),
]);
}
Expand Down

0 comments on commit 1828747

Please sign in to comment.