<?php
namespace Nwidart\Modules\Commands;
use Illuminate\Support\Str;
use Nwidart\Modules\Support\Config\GenerateConfigReader;
use Nwidart\Modules\Support\Stub;
use Nwidart\Modules\Traits\ModuleCommandTrait;
use Symfony\Component\Console\Input\InputArgument;
class MiddlewareMakeCommand extends GeneratorCommand
{
use ModuleCommandTrait;
protected $argumentName = 'name';
protected $name = 'module:make-middleware';
protected $description = 'Create a new middleware class for the specified module.';
public function getDefaultNamespace() : string
{
$module = $this->laravel['modules'];
return $module->config('paths.generator.filter.namespace') ?: $module->config('paths.generator.filter.path', 'Http/Middleware');
}