| @@ 8-33 (lines=26) @@ | ||
| 5 | use Illuminate\Queue\SerializesModels; |
|
| 6 | use Infinitypaul\LaravelUptime\Endpoint; |
|
| 7 | ||
| 8 | class EndpointIsBackUp |
|
| 9 | { |
|
| 10 | use SerializesModels; |
|
| 11 | ||
| 12 | protected $endpoint; |
|
| 13 | ||
| 14 | public function __construct(Endpoint $endpoint) |
|
| 15 | { |
|
| 16 | $this->endpoint = $endpoint; |
|
| 17 | } |
|
| 18 | ||
| 19 | public function getEndpoint() |
|
| 20 | { |
|
| 21 | return $this->endpoint; |
|
| 22 | } |
|
| 23 | ||
| 24 | public function getEndpointStatuses() |
|
| 25 | { |
|
| 26 | return $this->endpoint->statuses; |
|
| 27 | } |
|
| 28 | ||
| 29 | public function getEndpointStatus() |
|
| 30 | { |
|
| 31 | return $this->endpoint->status; |
|
| 32 | } |
|
| 33 | } |
|
| 34 | ||
| @@ 8-33 (lines=26) @@ | ||
| 5 | use Illuminate\Queue\SerializesModels; |
|
| 6 | use Infinitypaul\LaravelUptime\Endpoint; |
|
| 7 | ||
| 8 | class EndpointIsDown |
|
| 9 | { |
|
| 10 | use SerializesModels; |
|
| 11 | ||
| 12 | protected $endpoint; |
|
| 13 | ||
| 14 | public function __construct(Endpoint $endpoint) |
|
| 15 | { |
|
| 16 | $this->endpoint = $endpoint; |
|
| 17 | } |
|
| 18 | ||
| 19 | public function getEndpoint() |
|
| 20 | { |
|
| 21 | return $this->endpoint; |
|
| 22 | } |
|
| 23 | ||
| 24 | public function getEndpointStatuses() |
|
| 25 | { |
|
| 26 | return $this->endpoint->statuses; |
|
| 27 | } |
|
| 28 | ||
| 29 | public function getEndpointStatus() |
|
| 30 | { |
|
| 31 | return $this->endpoint->status; |
|
| 32 | } |
|
| 33 | } |
|
| 34 | ||