for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace App\Modules\V1\Notifications\Console\Commands;
use Caffeinated\Modules\Console\GeneratorCommand;
class MakeNotificationsCommand extends GeneratorCommand
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'make:module:notification
{name : The name of the notification class.}';
* The console command description.
protected $description = 'Create a new module notification class';
* String to store the command type.
protected $type = 'Module notification';
* Get the stub file for the generator.
* @return string
protected function getStub()
return __DIR__.'/stubs/notification.stub';
}
* Get the destination class path.
* @param string $name
protected function getPath($name)
return module_path('notifications', 'Notifications/'.$name.'.php');
* Parse the name and format according to the root namespace.
protected function qualifyClass($name)
return $name;
* Replace namespace in notification stub.
protected function getNamespace($name)
return module_class('notifications', 'Notifications');