This commit is contained in:
Marcel Pociot 2018-12-03 13:35:17 +01:00
parent dc8441be4a
commit bd737e4d79
1 changed files with 7 additions and 0 deletions

View File

@ -2,6 +2,8 @@
namespace BeyondCode\LaravelWebSockets\Statistics\Logging; namespace BeyondCode\LaravelWebSockets\Statistics\Logging;
use BeyondCode\LaravelWebSockets\Apps\App;
class Statistic class Statistic
{ {
protected $appId; protected $appId;
@ -23,6 +25,11 @@ class Statistic
$this->appId = $appId; $this->appId = $appId;
} }
public function isEnabled(): bool
{
return App::findById($this->appId)->statisticsEnabled;
}
public function connection() public function connection()
{ {
$this->connections++; $this->connections++;