for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Foundation\Generator\Commands;
use Foundation\Generator\Abstracts\AbstractGeneratorCommand;
use Foundation\Generator\Abstracts\ClassGeneratorCommand;
use Foundation\Generator\Events\PolicyGeneratedEvent;
class PolicyMakeCommand extends ClassGeneratorCommand
{
/**
* The console command name.
*
* @var string
*/
protected $name = 'larapi:make:policy';
* The name of the generated resource.
protected $generatorName = 'policy';
* The stub name.
protected $stub = 'policy.stub';
* The file path.
protected $filePath = '/Policies';
* The event that will fire when the file is created.
protected $event = PolicyGeneratedEvent::class;
protected function stubOptions(): array
return [
'NAMESPACE' => $this->getClassNamespace(),
'CLASS' => $this->getClassName(),
];
}