for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Webfactor\Laravel\Generators\Commands;
use Illuminate\Console\GeneratorCommand;
class MakeBackpackCrudRequest extends GeneratorCommand
{
/**
* The console command name.
*
* @var string
*/
protected $name = 'make:crud-request';
* The name and signature of the console command.
protected $signature = 'make:crud-request {name}';
* The console command description.
protected $description = 'Generate a Backpack CRUD request';
* The type of class being generated.
protected $type = 'Request';
* Get the destination class path.
* @param string $name
* @return string
protected function getPath($name)
$name = str_replace($this->laravel->getNamespace(), '', $name);
return $this->laravel['path'].'/'.str_replace('\\', '/', $name).'Request.php';
}
* Get the stub file for the generator.
protected function getStub()
return __DIR__.'/../../stubs/crud-request.stub';
* Get the default namespace for the class.
* @param string $rootNamespace
protected function getDefaultNamespace($rootNamespace)
return $rootNamespace.'\Http\Requests\Admin';
* Get the console command options.
* @return array
protected function getOptions()
return [
];