| Conditions | 4 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | public function handle() |
||
| 45 | { |
||
| 46 | $email = $this->argument('email') ? : null; |
||
| 47 | $allow = $this->option('allow'); |
||
| 48 | $count = $this->option('count'); |
||
| 49 | $hours = $this->option('hours'); |
||
| 50 | $days = $this->option('days'); |
||
| 51 | |||
| 52 | $invite = LaravelInvites::for($email)->allow($allow); |
||
|
|
|||
| 53 | |||
| 54 | if($days) |
||
| 55 | $invite->setExpiry(now()->addDays($days)); |
||
| 56 | else if($hours) |
||
| 57 | $invite->setExpiry(now()->addHours($hours)); |
||
| 58 | |||
| 59 | $invites = $invite->generate($count); |
||
| 60 | |||
| 61 | $this->info($count." invitations generated."); |
||
| 62 | } |
||
| 64 |