src/Commands/MakeFieldCommand.php
<?php
namespace Grafite\Forms\Commands;
class MakeFieldCommand extends BaseCommand
{
/**
* The console command name.
*
* @var string
*/
protected $name = 'make:field';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Create a new field';
/**
* The type of class being generated.
*
* @var string
*/
protected $type = 'field';
/**
* Get the stub file for the generator.
*
* @return string
*/
protected function getStub()
{
return __DIR__ . '/stubs/field.stub';
}
/**
* Get the default namespace for the class.
*
* @param string $rootNamespace
*
* @return string
*/
protected function getDefaultNamespace($rootNamespace)
{
return $rootNamespace . '\View\Forms\Fields';
}
}