Last active
November 27, 2019 14:47
-
-
Save fat4lix/3036e0b3a031365c35aa3d4f1178ae4d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Velodrive\Console\Commands; | |
| use Illuminate\Console\Command; | |
| class NotifyBirthday extends Command | |
| { | |
| /** | |
| * The name and signature of the console command. | |
| * | |
| * @var string | |
| */ | |
| protected $signature = 'notify:birthday | |
| { --test : Run linking to background queue} | |
| { userId? }'; | |
| /** | |
| * The console command description. | |
| * | |
| * @var string | |
| */ | |
| protected $description = 'Run linking SKU to product cards'; | |
| /** | |
| * Execute the console command | |
| */ | |
| public function handle() | |
| { | |
| $isTest = $this->option('test'); | |
| if ($isTest && $userId = $this->argument('userId')) { | |
| // Тестовая отправка | |
| var_dump($userId); | |
| } | |
| $this->info('ОК!'); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment