forked from laravel/framework
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCacheTableCommand.php
51 lines (44 loc) · 1.01 KB
/
CacheTableCommand.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
namespace Illuminate\Cache\Console;
use Illuminate\Console\MigrationGeneratorCommand;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'make:cache-table', aliases: ['cache:table'])]
class CacheTableCommand extends MigrationGeneratorCommand
{
/**
* The console command name.
*
* @var string
*/
protected $name = 'make:cache-table';
/**
* The console command name aliases.
*
* @var array
*/
protected $aliases = ['cache:table'];
/**
* The console command description.
*
* @var string
*/
protected $description = 'Create a migration for the cache database table';
/**
* Get the migration table name.
*
* @return string
*/
protected function migrationTableName()
{
return 'cache';
}
/**
* Get the path to the migration stub file.
*
* @return string
*/
protected function migrationStubFile()
{
return __DIR__.'/stubs/cache.stub';
}
}