1: <?php
2:
3: namespace Yajra\Datatables\Generators;
4:
5: use Illuminate\Console\GeneratorCommand;
6:
7: /**
8: * Class DataTablesScopeCommand.
9: *
10: * @package Yajra\Datatables\Generators
11: * @author Arjay Angeles <aqangeles@gmail.com>
12: */
13: class DataTablesScopeCommand extends GeneratorCommand
14: {
15: /**
16: * The console command name.
17: *
18: * @var string
19: */
20: protected $name = 'datatables:scope';
21:
22: /**
23: * The console command description.
24: *
25: * @var string
26: */
27: protected $description = 'Create a new DataTable Scope class.';
28:
29: /**
30: * The type of class being generated.
31: *
32: * @var string
33: */
34: protected $type = 'DataTable Scope';
35:
36: /**
37: * Get the default namespace for the class.
38: *
39: * @param string $rootNamespace
40: * @return string
41: */
42: protected function getDefaultNamespace($rootNamespace)
43: {
44: return $rootNamespace . '\DataTables\Scopes';
45: }
46:
47: /**
48: * Get the stub file for the generator.
49: *
50: * @return string
51: */
52: protected function getStub()
53: {
54: return __DIR__ . '/stubs/scopes.stub';
55: }
56: }
57: