File: /var/www/vhost/disk-apps/qas.sports-crowd.com/app/Core/Parameter/Application/ParameterService.php
<?php
declare(strict_types=1);
namespace App\Core\Parameter\Application;
use App\Parameter;
class ParameterService
{
public function find()
{
return Parameter::first();
}
public function appStoreUrl()
{
$parameters = $this->find();
$appStoreUrl = 'https://apps.apple.com/us/app/' . $parameters->ios_app_store;
return $appStoreUrl;
}
public function playStoreUrl()
{
$parameters = $this->find();
$playStoreUrl = 'https://play.google.com/store/apps/details?id=' . $parameters->android_play_store;
return $playStoreUrl;
}
public function getEnablePaymentGatewayAuthorizingEmail(): bool
{
$parameters = $this->find();
return (bool) $parameters->enable_payment_gateway_authorizing_email;
}
public function getPaymentGatewayAuthorizingEmail(): ?string
{
$parameters = $this->find();
return $parameters->payment_gateway_authorizing_email ?? null;
}
}