for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Bencoderus\Webhook\Console;
use Illuminate\Console\GeneratorCommand;
class MakeWebhookCommand extends GeneratorCommand
{
/**
* The console command name.
*
* @var string
*/
protected $name = 'make:webhook';
* The console command description.
protected $description = 'Create a new webhook class';
* The type of class being generated.
protected $type = 'Webhook';
* Get the stub file for the generator.
* @return string
protected function getStub()
return $this->resolveStubPath('/stubs/webhook.stub');
}
* Resolve the fully-qualified path to the stub.
* @param string $stub
protected function resolveStubPath($stub)
return file_exists($customPath = $this->laravel->basePath(trim($stub, '/')))
? $customPath
: __DIR__ . $stub;
* Get the default namespace for the class.
* @param string $rootNamespace
protected function getDefaultNamespace($rootNamespace)
return $rootNamespace . '\Http\Webhooks';