public function __construct(AuthManager $auth, Repository $config)
{
$this->auth = $auth;
$this->properties = collect();
$authDriver = $config['laravel-activitylog']['default_auth_driver'] ?? $auth->getDefaultDriver();
if (starts_with(app()->version(), '5.1')) {
$this->causedBy = $auth->driver($authDriver)->user();
} else {
$this->causedBy = $auth->guard($authDriver)->user();
}
$this->logName = $config['laravel-activitylog']['default_log_name'];
$this->logEnabled = $config['laravel-activitylog']['enabled'] ?? true;
}