mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 19:37:23 +08:00
config port int
This commit is contained in:
+5
-5
@@ -47,7 +47,7 @@ return [
|
||||
'driver' => 'mysql',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'host' => env('DB_HOST', '127.0.0.1'),
|
||||
'port' => env('DB_PORT', '3306'),
|
||||
'port' => (int)env('DB_PORT', '3306'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
@@ -130,16 +130,16 @@ return [
|
||||
'url' => env('REDIS_URL'),
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'password' => env('REDIS_PASSWORD', null),
|
||||
'port' => env('REDIS_PORT', '6379'),
|
||||
'database' => env('REDIS_DB', '0'),
|
||||
'port' => (int)env('REDIS_PORT', '6379'),
|
||||
'database' => (int)env('REDIS_DB', '0'),
|
||||
],
|
||||
|
||||
'cache' => [
|
||||
'url' => env('REDIS_URL'),
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'password' => env('REDIS_PASSWORD', null),
|
||||
'port' => env('REDIS_PORT', '6379'),
|
||||
'database' => env('REDIS_CACHE_DB', '1'),
|
||||
'port' => (int)env('REDIS_PORT', '6379'),
|
||||
'database' => (int)env('REDIS_CACHE_DB', '1'),
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
+3
-3
@@ -10,7 +10,7 @@ return [
|
||||
|
||||
'mysql' => [
|
||||
'host' => nexus_env('DB_HOST', '127.0.0.1'),
|
||||
'port' => nexus_env('DB_PORT', 3306),
|
||||
'port' => (int)nexus_env('DB_PORT', 3306),
|
||||
'username' => nexus_env('DB_USERNAME', 'root'),
|
||||
'password' => nexus_env('DB_PASSWORD', ''),
|
||||
'database' => nexus_env('DB_DATABASE', 'nexusphp'),
|
||||
@@ -18,7 +18,7 @@ return [
|
||||
|
||||
'redis' => [
|
||||
'host' => nexus_env('REDIS_HOST', '127.0.0.1'),
|
||||
'port' => nexus_env('REDIS_PORT', 6379),
|
||||
'port' => (int)nexus_env('REDIS_PORT', 6379),
|
||||
'database' => nexus_env('REDIS_DB', 0),
|
||||
'password' => nexus_env('REDIS_PASSWORD'),
|
||||
],
|
||||
@@ -27,7 +27,7 @@ return [
|
||||
'hosts' => [
|
||||
[
|
||||
'host' => nexus_env('ELASTICSEARCH_HOST','localhost'),
|
||||
'port' => nexus_env('ELASTICSEARCH_PORT','9200'),
|
||||
'port' => (int)nexus_env('ELASTICSEARCH_PORT','9200'),
|
||||
'scheme' => nexus_env('ELASTICSEARCH_SCHEME','https'),
|
||||
'user' => nexus_env('ELASTICSEARCH_USER','elastic'),
|
||||
'pass' => nexus_env('ELASTICSEARCH_PASS',''),
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Nexus\Core;
|
||||
|
||||
class Management
|
||||
{
|
||||
protected function buildTable(array $header, array $rows)
|
||||
{
|
||||
$table = '<table border="1" cellspacing="0" cellpadding="5" width="100%"><thead><tr>';
|
||||
foreach ($header as $key => $value) {
|
||||
$table .= sprintf('<td class="colhead">%s</td>', $value);
|
||||
}
|
||||
$table .= '</tr></thead><tbody>';
|
||||
foreach ($rows as $row) {
|
||||
$table .= '<tr>';
|
||||
foreach ($header as $headerKey => $headerValue) {
|
||||
$table .= sprintf('<td class="colfollow">%s</td>', $row[$headerKey] ?? '');
|
||||
}
|
||||
$table .= '</tr>';
|
||||
}
|
||||
$table .= '</tbody></table>';
|
||||
return $table;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user