Skip to content
Permalink
Browse files

Make create tag group more compatible with older laravel

  • Loading branch information...
rtconner committed Jul 3, 2019
1 parent 7195ea2 commit 66f120475dcbb989286ffebbd70ff4efda6524dc
Showing with 14 additions and 19 deletions.
  1. +14 −19 src/Console/Commands/GenerateTagGroup.php
@@ -5,38 +5,33 @@
use Conner\Tagging\TaggingUtility;
use Conner\Tagging\Model\TagGroup;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputArgument;
class GenerateTagGroup extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'tagging:create-group {group_name}';
/**
* The console command description.
*
* @var string
*/
protected $name = 'tagging:create-group';
protected $signature = 'tagging:create-group {group}';
protected $description = 'Create a laravel tag group';
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$groupName = $this->argument('group_name');
$groupName = $this->argument('group');
$tagGroup = new TagGroup();
$tagGroup->name = $groupName;
$tagGroup->slug = TaggingUtility::normalize($groupName);
$tagGroup->save();
$this->info('Created tag group: ' . $groupName);
$this->info('Created tag group: '.$groupName);
}
protected function getArguments()
{
return [
['group', InputArgument::REQUIRED, 'Name of the group to create.'],
];
}
}

0 comments on commit 66f1204

Please sign in to comment.
You can’t perform that action at this time.