This commit is contained in:
Bozhidar 2024-05-10 19:01:21 +03:00
parent 40868a74ce
commit 3bd7dc7c6c
20 changed files with 194 additions and 158 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
web/storage/installed
/docker/e2e-tests/node_modules/
web/config.php
web/phyre-config.ini

View file

@ -28,7 +28,7 @@ class SetIniSettings extends Command
public function handle()
{
// $ini = new IniModifier('phyre-config.ini');
// $ini->setValue('', '', 'phyre');
// $ini->setValue($key, $value, 'phyre');
// $ini->save();
}

18
web/app/PhyreConfig.php Normal file
View file

@ -0,0 +1,18 @@
<?php
namespace App;
class PhyreConfig
{
public static function get($key, $default = null)
{
// Parse without sections
$iniArray = parse_ini_file(base_path() . "/phyre-config.ini");
if (isset($iniArray[$key])) {
return $iniArray[$key];
}
return $default;
}
}

View file

@ -2,6 +2,7 @@
use Illuminate\Support\Facades\Facade;
use Illuminate\Support\ServiceProvider;
use App\PhyreConfig;
return [
@ -20,16 +21,16 @@ return [
/*
|--------------------------------------------------------------------------
| Application Environment
| Application PhyreConfig::getironment
|--------------------------------------------------------------------------
|
| This value determines the "environment" your application is currently
| This value determines the "PhyreConfig::getironment" your application is currently
| running in. This may determine how you prefer to configure various
| services the application utilizes. Set this in your ".env" file.
| services the application utilizes. Set this in your ".PhyreConfig::get" file.
|
*/
'env' => env('APP_ENV', 'production'),
'PhyreConfig::get' => PhyreConfig::get('APP_PhyreConfig::get', 'production'),
/*
|--------------------------------------------------------------------------
@ -42,7 +43,7 @@ return [
|
*/
'debug' => (bool) env('APP_DEBUG', false),
'debug' => (bool) PhyreConfig::get('APP_DEBUG', false),
/*
|--------------------------------------------------------------------------
@ -55,9 +56,9 @@ return [
|
*/
'url' => env('APP_URL', 'http://localhost'),
'url' => PhyreConfig::get('APP_URL', 'http://localhost'),
'asset_url' => env('ASSET_URL'),
'asset_url' => PhyreConfig::get('ASSET_URL'),
/*
|--------------------------------------------------------------------------
@ -122,7 +123,7 @@ return [
|
*/
'key' => env('APP_KEY'),
'key' => PhyreConfig::get('APP_KEY'),
'cipher' => 'AES-256-CBC',

View file

@ -1,4 +1,5 @@
<?php
use App\PhyreConfig;
return [
// The database table name
@ -19,7 +20,7 @@ return [
'notifications' => [
'new-device' => [
// Send the NewDevice notification
'enabled' => env('NEW_DEVICE_NOTIFICATION', true),
'enabled' => PhyreConfig::get('NEW_DEVICE_NOTIFICATION', true),
// Use torann/geoip to attempt to get a location
'location' => true,
@ -29,7 +30,7 @@ return [
],
'failed-login' => [
// Send the FailedLogin notification
'enabled' => env('FAILED_LOGIN_NOTIFICATION', false),
'enabled' => PhyreConfig::get('FAILED_LOGIN_NOTIFICATION', false),
// Use torann/geoip to attempt to get a location
'location' => true,

View file

@ -1,4 +1,5 @@
<?php
use App\PhyreConfig;
return [
@ -15,7 +16,7 @@ return [
|
*/
'default' => env('BROADCAST_DRIVER', 'null'),
'default' => PhyreConfig::get('BROADCAST_DRIVER', 'null'),
/*
|--------------------------------------------------------------------------
@ -32,16 +33,16 @@ return [
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'key' => PhyreConfig::get('PUSHER_APP_KEY'),
'secret' => PhyreConfig::get('PUSHER_APP_SECRET'),
'app_id' => PhyreConfig::get('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com',
'port' => env('PUSHER_PORT', 443),
'scheme' => env('PUSHER_SCHEME', 'https'),
'cluster' => PhyreConfig::get('PUSHER_APP_CLUSTER'),
'host' => PhyreConfig::get('PUSHER_HOST') ?: 'api-'.PhyreConfig::get('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com',
'port' => PhyreConfig::get('PUSHER_PORT', 443),
'scheme' => PhyreConfig::get('PUSHER_SCHEME', 'https'),
'encrypted' => true,
'useTLS' => env('PUSHER_SCHEME', 'https') === 'https',
'useTLS' => PhyreConfig::get('PUSHER_SCHEME', 'https') === 'https',
],
'client_options' => [
// Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
@ -50,7 +51,7 @@ return [
'ably' => [
'driver' => 'ably',
'key' => env('ABLY_KEY'),
'key' => PhyreConfig::get('ABLY_KEY'),
],
'redis' => [

View file

@ -1,6 +1,7 @@
<?php
use Illuminate\Support\Str;
use App\PhyreConfig;
return [
@ -15,7 +16,7 @@ return [
|
*/
'default' => 'array', //env('CACHE_DRIVER', 'file'),
'default' => 'array', //PhyreConfig::get('CACHE_DRIVER', 'file'),
/*
|--------------------------------------------------------------------------
@ -57,18 +58,18 @@ return [
'memcached' => [
'driver' => 'memcached',
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
'persistent_id' => PhyreConfig::get('MEMCACHED_PERSISTENT_ID'),
'sasl' => [
env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'),
PhyreConfig::get('MEMCACHED_USERNAME'),
PhyreConfig::get('MEMCACHED_PASSWORD'),
],
'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
'servers' => [
[
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
'port' => env('MEMCACHED_PORT', 11211),
'host' => PhyreConfig::get('MEMCACHED_HOST', '127.0.0.1'),
'port' => PhyreConfig::get('MEMCACHED_PORT', 11211),
'weight' => 100,
],
],
@ -82,11 +83,11 @@ return [
'dynamodb' => [
'driver' => 'dynamodb',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
'endpoint' => env('DYNAMODB_ENDPOINT'),
'key' => PhyreConfig::get('AWS_ACCESS_KEY_ID'),
'secret' => PhyreConfig::get('AWS_SECRET_ACCESS_KEY'),
'region' => PhyreConfig::get('AWS_DEFAULT_REGION', 'us-east-1'),
'table' => PhyreConfig::get('DYNAMODB_CACHE_TABLE', 'cache'),
'endpoint' => PhyreConfig::get('DYNAMODB_ENDPOINT'),
],
'octane' => [
@ -106,6 +107,6 @@ return [
|
*/
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'),
'prefix' => PhyreConfig::get('CACHE_PREFIX', Str::slug(PhyreConfig::get('APP_NAME', 'laravel'), '_').'_cache_'),
];

View file

@ -1,6 +1,7 @@
<?php
use Illuminate\Support\Str;
use App\PhyreConfig;
return [
@ -15,7 +16,7 @@ return [
|
*/
'default' => env('DB_CONNECTION', 'mysql'),
'default' => PhyreConfig::get('DB_CONNECTION', 'mysql'),
/*
|--------------------------------------------------------------------------
@ -37,10 +38,10 @@ return [
// 'sqlite' => [
// 'driver' => 'sqlite',
// 'url' => env('DATABASE_URL'),
// 'database' => env('DB_DATABASE', database_path('database.sqlite')),
// 'url' => PhyreConfig::get('DATABASE_URL'),
// 'database' => PhyreConfig::get('DB_DATABASE', database_path('database.sqlite')),
// 'prefix' => '',
// 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
// 'foreign_key_constraints' => PhyreConfig::get('DB_FOREIGN_KEYS', true),
// ],
'sqlite' => [
@ -53,13 +54,13 @@ return [
'mysql' => [
'driver' => 'mysql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'url' => PhyreConfig::get('DATABASE_URL'),
'host' => PhyreConfig::get('DB_HOST', '127.0.0.1'),
'port' => PhyreConfig::get('DB_PORT', '3306'),
'database' => PhyreConfig::get('DB_DATABASE', 'forge'),
'username' => PhyreConfig::get('DB_USERNAME', 'forge'),
'password' => PhyreConfig::get('DB_PASSWORD', ''),
'unix_socket' => PhyreConfig::get('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
@ -67,18 +68,18 @@ return [
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
PDO::MYSQL_ATTR_SSL_CA => PhyreConfig::get('MYSQL_ATTR_SSL_CA'),
]) : [],
],
'pgsql' => [
'driver' => 'pgsql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'url' => PhyreConfig::get('DATABASE_URL'),
'host' => PhyreConfig::get('DB_HOST', '127.0.0.1'),
'port' => PhyreConfig::get('DB_PORT', '5432'),
'database' => PhyreConfig::get('DB_DATABASE', 'forge'),
'username' => PhyreConfig::get('DB_USERNAME', 'forge'),
'password' => PhyreConfig::get('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
@ -88,17 +89,17 @@ return [
'sqlsrv' => [
'driver' => 'sqlsrv',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'url' => PhyreConfig::get('DATABASE_URL'),
'host' => PhyreConfig::get('DB_HOST', 'localhost'),
'port' => PhyreConfig::get('DB_PORT', '1433'),
'database' => PhyreConfig::get('DB_DATABASE', 'forge'),
'username' => PhyreConfig::get('DB_USERNAME', 'forge'),
'password' => PhyreConfig::get('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
// 'encrypt' => env('DB_ENCRYPT', 'yes'),
// 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),
// 'encrypt' => PhyreConfig::get('DB_ENCRYPT', 'yes'),
// 'trust_server_certificate' => PhyreConfig::get('DB_TRUST_SERVER_CERTIFICATE', 'false'),
],
],
@ -129,29 +130,29 @@ return [
'redis' => [
'client' => env('REDIS_CLIENT', 'phpredis'),
'client' => PhyreConfig::get('REDIS_CLIENT', 'phpredis'),
'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
'cluster' => PhyreConfig::get('REDIS_CLUSTER', 'redis'),
'prefix' => PhyreConfig::get('REDIS_PREFIX', Str::slug(PhyreConfig::get('APP_NAME', 'laravel'), '_').'_database_'),
],
'default' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_DB', '0'),
'url' => PhyreConfig::get('REDIS_URL'),
'host' => PhyreConfig::get('REDIS_HOST', '127.0.0.1'),
'username' => PhyreConfig::get('REDIS_USERNAME'),
'password' => PhyreConfig::get('REDIS_PASSWORD'),
'port' => PhyreConfig::get('REDIS_PORT', '6379'),
'database' => PhyreConfig::get('REDIS_DB', '0'),
],
'cache' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_CACHE_DB', '1'),
'url' => PhyreConfig::get('REDIS_URL'),
'host' => PhyreConfig::get('REDIS_HOST', '127.0.0.1'),
'username' => PhyreConfig::get('REDIS_USERNAME'),
'password' => PhyreConfig::get('REDIS_PASSWORD'),
'port' => PhyreConfig::get('REDIS_PORT', '6379'),
'database' => PhyreConfig::get('REDIS_CACHE_DB', '1'),
],
],

View file

@ -1,4 +1,5 @@
<?php
use App\PhyreConfig;
return [
@ -8,7 +9,7 @@ return [
//
// // Send the NewDevice notification
//
// 'enabled' => env('NEW_DEVICE_NOTIFICATION', true),
// 'enabled' => PhyreConfig::get('NEW_DEVICE_NOTIFICATION', true),
//
//
//

View file

@ -1,4 +1,5 @@
<?php
use App\PhyreConfig;
return [
@ -18,11 +19,11 @@ return [
// 'echo' => [
// 'broadcaster' => 'pusher',
// 'key' => env('VITE_PUSHER_APP_KEY'),
// 'cluster' => env('VITE_PUSHER_APP_CLUSTER'),
// 'wsHost' => env('VITE_PUSHER_HOST'),
// 'wsPort' => env('VITE_PUSHER_PORT'),
// 'wssPort' => env('VITE_PUSHER_PORT'),
// 'key' => PhyreConfig::get('VITE_PUSHER_APP_KEY'),
// 'cluster' => PhyreConfig::get('VITE_PUSHER_APP_CLUSTER'),
// 'wsHost' => PhyreConfig::get('VITE_PUSHER_HOST'),
// 'wsPort' => PhyreConfig::get('VITE_PUSHER_PORT'),
// 'wssPort' => PhyreConfig::get('VITE_PUSHER_PORT'),
// 'authEndpoint' => '/api/v1/broadcasting/auth',
// 'disableStats' => true,
// 'encrypted' => true,
@ -40,7 +41,7 @@ return [
|
*/
'default_filesystem_disk' => env('FILAMENT_FILESYSTEM_DISK', 'public'),
'default_filesystem_disk' => PhyreConfig::get('FILAMENT_FILESYSTEM_DISK', 'public'),
/*
|--------------------------------------------------------------------------

View file

@ -1,4 +1,5 @@
<?php
use App\PhyreConfig;
return [
@ -13,7 +14,7 @@ return [
|
*/
'default' => env('FILESYSTEM_DISK', 'local'),
'default' => PhyreConfig::get('FILESYSTEM_DISK', 'local'),
/*
|--------------------------------------------------------------------------
@ -39,20 +40,20 @@ return [
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'url' => PhyreConfig::get('APP_URL').'/storage',
'visibility' => 'public',
'throw' => false,
],
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
'key' => PhyreConfig::get('AWS_ACCESS_KEY_ID'),
'secret' => PhyreConfig::get('AWS_SECRET_ACCESS_KEY'),
'region' => PhyreConfig::get('AWS_DEFAULT_REGION'),
'bucket' => PhyreConfig::get('AWS_BUCKET'),
'url' => PhyreConfig::get('AWS_URL'),
'endpoint' => PhyreConfig::get('AWS_ENDPOINT'),
'use_path_style_endpoint' => PhyreConfig::get('AWS_USE_PATH_STYLE_ENDPOINT', false),
'throw' => false,
],

View file

@ -1,4 +1,5 @@
<?php
use App\PhyreConfig;
return [
@ -29,7 +30,7 @@ return [
*/
'bcrypt' => [
'rounds' => env('BCRYPT_ROUNDS', 12),
'rounds' => PhyreConfig::get('BCRYPT_ROUNDS', 12),
'verify' => true,
],

View file

@ -1,4 +1,5 @@
<?php
use App\PhyreConfig;
return [
'default' => 'default',
@ -18,7 +19,7 @@ return [
/*
* Edit to include full URL in ui for assets
*/
'use_absolute_path' => env('L5_SWAGGER_USE_ABSOLUTE_PATH', true),
'use_absolute_path' => PhyreConfig::get('L5_SWAGGER_USE_ABSOLUTE_PATH', true),
/*
* File name of the generated json documentation file
@ -33,7 +34,7 @@ return [
/*
* Set this to `json` or `yaml` to determine which documentation file to use in UI
*/
'format_to_use_for_docs' => env('L5_FORMAT_TO_USE_FOR_DOCS', 'json'),
'format_to_use_for_docs' => PhyreConfig::get('L5_FORMAT_TO_USE_FOR_DOCS', 'json'),
/*
* Absolute paths to directory containing the swagger annotations are stored.
@ -87,12 +88,12 @@ return [
/*
* Edit to set the api's base path
*/
'base' => env('L5_SWAGGER_BASE_PATH', null),
'base' => PhyreConfig::get('L5_SWAGGER_BASE_PATH', null),
/*
* Edit to set path where swagger ui assets should be stored
*/
'swagger_ui_assets_path' => env('L5_SWAGGER_UI_ASSETS_PATH', 'vendor/swagger-api/swagger-ui/dist/'),
'swagger_ui_assets_path' => PhyreConfig::get('L5_SWAGGER_UI_ASSETS_PATH', 'vendor/swagger-api/swagger-ui/dist/'),
/*
* Absolute path to directories that should be excluded from scanning
@ -145,7 +146,7 @@ return [
* Allows to generate specs either for OpenAPI 3.0.0 or OpenAPI 3.1.0.
* By default the spec will be in version 3.0.0
*/
'open_api_spec_version' => env('L5_SWAGGER_OPEN_API_SPEC_VERSION', \L5Swagger\Generator::OPEN_API_DEFAULT_SPEC_VERSION),
'open_api_spec_version' => PhyreConfig::get('L5_SWAGGER_OPEN_API_SPEC_VERSION', \L5Swagger\Generator::OPEN_API_DEFAULT_SPEC_VERSION),
],
/*
@ -220,12 +221,12 @@ return [
* Set this to `true` in development mode so that docs would be regenerated on each request
* Set this to `false` to disable swagger generation on production
*/
'generate_always' => env('L5_SWAGGER_GENERATE_ALWAYS', false),
'generate_always' => PhyreConfig::get('L5_SWAGGER_GENERATE_ALWAYS', false),
/*
* Set this to `true` to generate a copy of documentation in yaml format
*/
'generate_yaml_copy' => env('L5_SWAGGER_GENERATE_YAML_COPY', false),
'generate_yaml_copy' => PhyreConfig::get('L5_SWAGGER_GENERATE_YAML_COPY', false),
/*
* Edit to trust the proxy's ip address - needed for AWS Load Balancer
@ -244,7 +245,7 @@ return [
* 'method' (sort by HTTP method).
* Default is the order returned by the server unchanged.
*/
'operations_sort' => env('L5_SWAGGER_OPERATIONS_SORT', null),
'operations_sort' => PhyreConfig::get('L5_SWAGGER_OPERATIONS_SORT', null),
/*
* Pass the validatorUrl parameter to SwaggerUi init on the JS side.
@ -263,7 +264,7 @@ return [
* 'full' (expands the tags and operations),
* 'none' (expands nothing).
*/
'doc_expansion' => env('L5_SWAGGER_UI_DOC_EXPANSION', 'none'),
'doc_expansion' => PhyreConfig::get('L5_SWAGGER_UI_DOC_EXPANSION', 'none'),
/**
* If set, enables filtering. The top bar will show an edit box that
@ -273,14 +274,14 @@ return [
* is case-sensitive matching the filter expression anywhere inside
* the tag.
*/
'filter' => env('L5_SWAGGER_UI_FILTERS', true), // true | false
'filter' => PhyreConfig::get('L5_SWAGGER_UI_FILTERS', true), // true | false
],
'authorization' => [
/*
* If set to true, it persists authorization data, and it would not be lost on browser close/refresh
*/
'persist_authorization' => env('L5_SWAGGER_UI_PERSIST_AUTHORIZATION', false),
'persist_authorization' => PhyreConfig::get('L5_SWAGGER_UI_PERSIST_AUTHORIZATION', false),
'oauth2' => [
/*
@ -294,7 +295,7 @@ return [
* Constants which can be used in annotations
*/
'constants' => [
'L5_SWAGGER_CONST_HOST' => env('L5_SWAGGER_CONST_HOST', 'http://my-default-host.com'),
'L5_SWAGGER_CONST_HOST' => PhyreConfig::get('L5_SWAGGER_CONST_HOST', 'http://my-default-host.com'),
],
],
];

View file

@ -4,6 +4,7 @@ use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
use Monolog\Processor\PsrLogMessageProcessor;
use App\PhyreConfig;
return [
@ -18,7 +19,7 @@ return [
|
*/
'default' => env('LOG_CHANNEL', 'stack'),
'default' => PhyreConfig::get('LOG_CHANNEL', 'stack'),
/*
|--------------------------------------------------------------------------
@ -32,7 +33,7 @@ return [
*/
'deprecations' => [
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
'channel' => PhyreConfig::get('LOG_DEPRECATIONS_CHANNEL', 'null'),
'trace' => false,
],
@ -61,44 +62,44 @@ return [
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'level' => PhyreConfig::get('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'level' => PhyreConfig::get('LOG_LEVEL', 'debug'),
'days' => 14,
'replace_placeholders' => true,
],
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'url' => PhyreConfig::get('LOG_SLACK_WEBHOOK_URL'),
'username' => 'Laravel Log',
'emoji' => ':boom:',
'level' => env('LOG_LEVEL', 'critical'),
'level' => PhyreConfig::get('LOG_LEVEL', 'critical'),
'replace_placeholders' => true,
],
'papertrail' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
'level' => PhyreConfig::get('LOG_LEVEL', 'debug'),
'handler' => PhyreConfig::get('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
'host' => PhyreConfig::get('PAPERTRAIL_URL'),
'port' => PhyreConfig::get('PAPERTRAIL_PORT'),
'connectionString' => 'tls://'.PhyreConfig::get('PAPERTRAIL_URL').':'.PhyreConfig::get('PAPERTRAIL_PORT'),
],
'processors' => [PsrLogMessageProcessor::class],
],
'stderr' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'level' => PhyreConfig::get('LOG_LEVEL', 'debug'),
'handler' => StreamHandler::class,
'formatter' => env('LOG_STDERR_FORMATTER'),
'formatter' => PhyreConfig::get('LOG_STDERR_FORMATTER'),
'with' => [
'stream' => 'php://stderr',
],
@ -107,14 +108,14 @@ return [
'syslog' => [
'driver' => 'syslog',
'level' => env('LOG_LEVEL', 'debug'),
'level' => PhyreConfig::get('LOG_LEVEL', 'debug'),
'facility' => LOG_USER,
'replace_placeholders' => true,
],
'errorlog' => [
'driver' => 'errorlog',
'level' => env('LOG_LEVEL', 'debug'),
'level' => PhyreConfig::get('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
],

View file

@ -1,4 +1,5 @@
<?php
use App\PhyreConfig;
return [
@ -13,7 +14,7 @@ return [
|
*/
'default' => env('MAIL_MAILER', 'smtp'),
'default' => PhyreConfig::get('MAIL_MAILER', 'smtp'),
/*
|--------------------------------------------------------------------------
@ -36,14 +37,14 @@ return [
'mailers' => [
'smtp' => [
'transport' => 'smtp',
'url' => env('MAIL_URL'),
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
'port' => env('MAIL_PORT', 587),
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'url' => PhyreConfig::get('MAIL_URL'),
'host' => PhyreConfig::get('MAIL_HOST', 'smtp.mailgun.org'),
'port' => PhyreConfig::get('MAIL_PORT', 587),
'encryption' => PhyreConfig::get('MAIL_ENCRYPTION', 'tls'),
'username' => PhyreConfig::get('MAIL_USERNAME'),
'password' => PhyreConfig::get('MAIL_PASSWORD'),
'timeout' => null,
'local_domain' => env('MAIL_EHLO_DOMAIN'),
'local_domain' => PhyreConfig::get('MAIL_EHLO_DOMAIN'),
],
'ses' => [
@ -67,12 +68,12 @@ return [
'sendmail' => [
'transport' => 'sendmail',
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
'path' => PhyreConfig::get('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
],
'log' => [
'transport' => 'log',
'channel' => env('MAIL_LOG_CHANNEL'),
'channel' => PhyreConfig::get('MAIL_LOG_CHANNEL'),
],
'array' => [
@ -100,8 +101,8 @@ return [
*/
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
'name' => env('MAIL_FROM_NAME', 'Example'),
'address' => PhyreConfig::get('MAIL_FROM_ADDRESS', 'hello@example.com'),
'name' => PhyreConfig::get('MAIL_FROM_NAME', 'Example'),
],
/*

View file

@ -1,4 +1,5 @@
<?php
use App\PhyreConfig;
return [
@ -53,19 +54,19 @@ return [
'sqs' => [
'driver' => 'sqs',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
'queue' => env('SQS_QUEUE', 'default'),
'suffix' => env('SQS_SUFFIX'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'key' => PhyreConfig::get('AWS_ACCESS_KEY_ID'),
'secret' => PhyreConfig::get('AWS_SECRET_ACCESS_KEY'),
'prefix' => PhyreConfig::get('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
'queue' => PhyreConfig::get('SQS_QUEUE', 'default'),
'suffix' => PhyreConfig::get('SQS_SUFFIX'),
'region' => PhyreConfig::get('AWS_DEFAULT_REGION', 'us-east-1'),
'after_commit' => false,
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
'queue' => env('REDIS_QUEUE', 'default'),
'queue' => PhyreConfig::get('REDIS_QUEUE', 'default'),
'retry_after' => 90,
'block_for' => null,
'after_commit' => false,
@ -85,7 +86,7 @@ return [
*/
'batching' => [
'database' => env('DB_CONNECTION', 'mysql'),
'database' => PhyreConfig::get('DB_CONNECTION', 'mysql'),
'table' => 'job_batches',
],
@ -101,8 +102,8 @@ return [
*/
'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
'database' => env('DB_CONNECTION', 'mysql'),
'driver' => PhyreConfig::get('QUEUE_FAILED_DRIVER', 'database-uuids'),
'database' => PhyreConfig::get('DB_CONNECTION', 'mysql'),
'table' => 'failed_jobs',
],

View file

@ -1,6 +1,7 @@
<?php
use Laravel\Sanctum\Sanctum;
use App\PhyreConfig;
return [
@ -15,7 +16,7 @@ return [
|
*/
'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf(
'stateful' => explode(',', PhyreConfig::get('SANCTUM_STATEFUL_DOMAINS', sprintf(
'%s%s',
'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1',
Sanctum::currentApplicationUrlWithPort()
@ -61,7 +62,7 @@ return [
|
*/
'token_prefix' => env('SANCTUM_TOKEN_PREFIX', ''),
'token_prefix' => PhyreConfig::get('SANCTUM_TOKEN_PREFIX', ''),
/*
|--------------------------------------------------------------------------

View file

@ -1,4 +1,5 @@
<?php
use App\PhyreConfig;
return [
@ -15,20 +16,20 @@ return [
*/
'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
'domain' => PhyreConfig::get('MAILGUN_DOMAIN'),
'secret' => PhyreConfig::get('MAILGUN_SECRET'),
'endpoint' => PhyreConfig::get('MAILGUN_ENDPOINT', 'api.mailgun.net'),
'scheme' => 'https',
],
'postmark' => [
'token' => env('POSTMARK_TOKEN'),
'token' => PhyreConfig::get('POSTMARK_TOKEN'),
],
'ses' => [
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'key' => PhyreConfig::get('AWS_ACCESS_KEY_ID'),
'secret' => PhyreConfig::get('AWS_SECRET_ACCESS_KEY'),
'region' => PhyreConfig::get('AWS_DEFAULT_REGION', 'us-east-1'),
],
];

View file

@ -1,6 +1,7 @@
<?php
use Illuminate\Support\Str;
use App\PhyreConfig;
return [
@ -18,7 +19,7 @@ return [
|
*/
'driver' => env('SESSION_DRIVER', 'file'),
'driver' => PhyreConfig::get('SESSION_DRIVER', 'file'),
/*
|--------------------------------------------------------------------------
@ -31,7 +32,7 @@ return [
|
*/
'lifetime' => env('SESSION_LIFETIME', 120),
'lifetime' => PhyreConfig::get('SESSION_LIFETIME', 120),
'expire_on_close' => false,
@ -72,7 +73,7 @@ return [
|
*/
'connection' => env('SESSION_CONNECTION'),
'connection' => PhyreConfig::get('SESSION_CONNECTION'),
/*
|--------------------------------------------------------------------------
@ -100,7 +101,7 @@ return [
|
*/
'store' => env('SESSION_STORE'),
'store' => PhyreConfig::get('SESSION_STORE'),
/*
|--------------------------------------------------------------------------
@ -126,9 +127,9 @@ return [
|
*/
'cookie' => env(
'cookie' => PhyreConfig::get(
'SESSION_COOKIE',
Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
Str::slug(PhyreConfig::get('APP_NAME', 'laravel'), '_').'_session'
),
/*
@ -155,7 +156,7 @@ return [
|
*/
'domain' => env('SESSION_DOMAIN'),
'domain' => PhyreConfig::get('SESSION_DOMAIN'),
/*
|--------------------------------------------------------------------------
@ -168,7 +169,7 @@ return [
|
*/
'secure' => env('SESSION_SECURE_COOKIE'),
'secure' => PhyreConfig::get('SESSION_SECURE_COOKIE'),
/*
|--------------------------------------------------------------------------

View file

@ -1,4 +1,5 @@
<?php
use App\PhyreConfig;
return [
@ -28,7 +29,7 @@ return [
|
*/
'compiled' => env(
'compiled' => PhyreConfig::get(
'VIEW_COMPILED_PATH',
realpath(storage_path('framework/views'))
),