CacheTableCommand.php 873 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace Illuminate\Cache\Console;
  3. use Illuminate\Console\MigrationGeneratorCommand;
  4. use Symfony\Component\Console\Attribute\AsCommand;
  5. #[AsCommand(name: 'cache:table')]
  6. class CacheTableCommand extends MigrationGeneratorCommand
  7. {
  8. /**
  9. * The console command name.
  10. *
  11. * @var string
  12. */
  13. protected $name = 'cache:table';
  14. /**
  15. * The console command description.
  16. *
  17. * @var string
  18. */
  19. protected $description = 'Create a migration for the cache database table';
  20. /**
  21. * Get the migration table name.
  22. *
  23. * @return string
  24. */
  25. protected function migrationTableName()
  26. {
  27. return 'cache';
  28. }
  29. /**
  30. * Get the path to the migration stub file.
  31. *
  32. * @return string
  33. */
  34. protected function migrationStubFile()
  35. {
  36. return __DIR__.'/stubs/cache.stub';
  37. }
  38. }