diff --git a/README.md b/README.md index c737078..d8bcbd6 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ php8.1 版本后内置枚举支持,更多信息可以查看:https://www.php. ## 安装 -支持 Laravel 10/Lumen 10 以上版本: +支持 Laravel 10 以上版本: ```shell $ composer require jiannei/laravel-enum -vvv @@ -129,13 +129,13 @@ $array = UserTypeEnum::toSelectArray();// 支持多语言配置 ### 枚举转换和校验 -- https://laravel.com/docs/10.x/requests#retrieving-enum-input-values -- https://laravel.com/docs/10.x/validation#rule-enum +- https://laravel.com/docs/11.x/requests#retrieving-enum-input-values +- https://laravel.com/docs/11.x/validation#rule-enum ### Model 中的枚举转换 -- https://laravel.com/docs/10.x/eloquent-mutators#enum-casting +- https://laravel.com/docs/11.x/eloquent-mutators#enum-casting ## License diff --git a/src/Console/Commands/MakeEnumCommand.php b/src/Console/Commands/MakeEnumCommand.php deleted file mode 100644 index 865adfa..0000000 --- a/src/Console/Commands/MakeEnumCommand.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Jiannei\Enum\Laravel\Console\Commands; - -use Illuminate\Console\GeneratorCommand; -use Illuminate\Support\Facades\File; - -class MakeEnumCommand extends GeneratorCommand -{ - protected $signature = 'make:enum {name} {--type=int}'; - - protected $description = 'Create a backed enum'; - - protected $type = 'Enum'; - - protected function getStub() - { - $stubPath = base_path("stubs/enum/{$this->option('type')}.stub"); - - return File::exists($stubPath) ? $stubPath : dirname(__DIR__, 3)."/stubs/enum/{$this->option('type')}.stub"; - } - - protected function getDefaultNamespace($rootNamespace) - { - return $rootNamespace.'\Enums'; - } -} diff --git a/stubs/enum/int.stub b/stubs/enum/int.stub deleted file mode 100644 index 4e971e7..0000000 --- a/stubs/enum/int.stub +++ /dev/null @@ -1,8 +0,0 @@ -