Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Spatie\LaravelIgnition\Commands;
4
 
5
use Illuminate\Console\GeneratorCommand;
6
use Symfony\Component\Console\Input\InputOption;
7
 
8
class SolutionMakeCommand extends GeneratorCommand
9
{
10
    protected $name = 'ignition:make-solution';
11
 
12
    protected $description = 'Create a new custom Ignition solution class';
13
 
14
    protected $type = 'Solution';
15
 
16
    protected function getStub(): string
17
    {
18
        return $this->option('runnable')
19
            ? __DIR__.'/stubs/runnable-solution.stub'
20
            : __DIR__.'/stubs/solution.stub';
21
    }
22
 
23
    protected function getDefaultNamespace($rootNamespace)
24
    {
25
        return "{$rootNamespace}\\Solutions";
26
    }
27
 
28
    /** @return array<int, mixed> */
29
    protected function getOptions(): array
30
    {
31
        return [
32
            ['runnable', null, InputOption::VALUE_NONE, 'Create runnable solution'],
33
        ];
34
    }
35
}