1 | <?php |
||
8 | class CreateUser extends Command |
||
9 | { |
||
10 | /** |
||
11 | * The name and signature of the console command. |
||
12 | * |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $signature = 'tenant:create-user {--fake}'; |
||
16 | |||
17 | /** |
||
18 | * The console command description. |
||
19 | * |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $description = 'Create a new user with the option to assign to tenants'; |
||
23 | |||
24 | protected $faker; |
||
25 | |||
26 | /** |
||
27 | * Create a new command instance. |
||
28 | * |
||
29 | * @return void |
||
|
|||
30 | */ |
||
31 | public function __construct(Faker $faker) |
||
37 | |||
38 | /** |
||
39 | * Execute the console command. |
||
40 | * |
||
41 | * @return mixed |
||
42 | */ |
||
43 | public function handle() |
||
58 | |||
59 | private function createFakeUser() |
||
81 | |||
82 | private function createNewUser() |
||
86 | } |
||
87 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.