for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Rinvex\Widgets\Console\Commands;
use Illuminate\Console\GeneratorCommand;
class WidgetMakeCommand extends GeneratorCommand
{
/**
* The console command name.
*
* @var string
*/
protected $name = 'make:widget';
* The console command description.
protected $description = 'Create a new widget';
* The type of class being generated.
protected $type = 'Widget';
* Get the stub file for the generator.
* @return string
protected function getStub(): string
return __DIR__.'/../../../resources/stubs/widget.stub';
}
* Get the default namespace for the class.
* @param string $rootNamespace
protected function getDefaultNamespace($rootNamespace): string
return $rootNamespace.'\Widgets';