| 1 | <?php |
||
| 9 | class Generator |
||
| 10 | { |
||
| 11 | protected $amount = 1; |
||
| 12 | protected $uses = 1; |
||
| 13 | protected $email; |
||
| 14 | protected $expiry; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var \Clarkeash\Doorman\DoormanManager |
||
| 18 | */ |
||
| 19 | protected $manager; |
||
| 20 | |||
| 21 | public function __construct(DoormanManager $manager) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param int $amount |
||
| 28 | * |
||
| 29 | * @return $this |
||
| 30 | */ |
||
| 31 | public function times(int $amount = 1) |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @param int $amount |
||
| 40 | * |
||
| 41 | * @return $this |
||
| 42 | */ |
||
| 43 | public function uses(int $amount = 1) |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @param string $email |
||
| 52 | * |
||
| 53 | * @return $this |
||
| 54 | */ |
||
| 55 | public function for (string $email) |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @param \Carbon\Carbon $date |
||
| 64 | * |
||
| 65 | * @return $this |
||
| 66 | */ |
||
| 67 | public function expiresOn(Carbon $date) |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @param int $days |
||
| 76 | * |
||
| 77 | * @return $this |
||
| 78 | */ |
||
| 79 | public function expiresIn($days = 14) |
||
| 85 | |||
| 86 | /** |
||
| 87 | * @return \Clarkeash\Doorman\Models\Invite |
||
| 88 | */ |
||
| 89 | protected function build(): Invite |
||
| 99 | |||
| 100 | /** |
||
| 101 | * @return \Illuminate\Support\Collection |
||
| 102 | */ |
||
| 103 | public function make() |
||
| 117 | } |
||
| 118 |