From c6f44d030df25f962f0e7bbc3c7e36d7981e7b3b Mon Sep 17 00:00:00 2001 From: HichemTab Date: Tue, 25 Jul 2023 12:20:54 +0100 Subject: [PATCH] fixes --- .../Console/Commands/TokensValidation/CreateCustomHandler.php | 2 ++ .../stubs/Confirmation/ConfirmationUrlBuilder.stub | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Laravel/Console/Commands/TokensValidation/CreateCustomHandler.php b/src/Laravel/Console/Commands/TokensValidation/CreateCustomHandler.php index 55e261a..fb24a5d 100644 --- a/src/Laravel/Console/Commands/TokensValidation/CreateCustomHandler.php +++ b/src/Laravel/Console/Commands/TokensValidation/CreateCustomHandler.php @@ -71,6 +71,8 @@ public function handle(): int $choice = trim($parts[1]); $name = $this->ask('name of the class ?', $choice); + if ($name == 'My...') $name = 'My'.$choice; + if ($name == 'Custom...') $name = 'Custom'.$choice; $stub = File::get(__DIR__."/stubs/$head/$choice.stub"); $stub = str_replace("//TO*DO", "//TODO", $stub); $stub = str_replace("class $choice extends", "class $name extends", $stub); diff --git a/src/Laravel/Console/Commands/TokensValidation/stubs/Confirmation/ConfirmationUrlBuilder.stub b/src/Laravel/Console/Commands/TokensValidation/stubs/Confirmation/ConfirmationUrlBuilder.stub index 994577d..bfaff2f 100644 --- a/src/Laravel/Console/Commands/TokensValidation/stubs/Confirmation/ConfirmationUrlBuilder.stub +++ b/src/Laravel/Console/Commands/TokensValidation/stubs/Confirmation/ConfirmationUrlBuilder.stub @@ -4,6 +4,7 @@ namespace App\Actions\TokensValidation\Confirmation; use HichemtabTech\TokensValidation\Actions\Confirmation\ConfirmationUrlBuilder as DefaultConfirmationUrlBuilder; use HichemtabTech\TokensValidation\Model\Confirmation\ConfirmationToken; +use HichemtabTech\TokensValidation\Actions\Confirmation\UserIdAndToken; /** * @@ -21,6 +22,7 @@ class ConfirmationUrlBuilder extends DefaultConfirmationUrlBuilder public function __construct() { + parent::__construct(); } /**