第一次提交

This commit is contained in:
lingling 2024-04-20 11:04:06 +08:00
parent 04bad91846
commit eb6c7a0550
5 changed files with 2098 additions and 19 deletions

1
.gitignore vendored
View File

@ -6,3 +6,4 @@
.env
/tests/tmp
/tests/.phpunit.result.cache
/config

View File

@ -3,6 +3,7 @@
namespace app\controller;
use support\Request;
use support\Db;
class IndexController
{
@ -10,7 +11,8 @@ class IndexController
{
static $readme;
if (!$readme) {
$readme = file_get_contents(base_path('README.md'));
$readme = '70';
// $readme = file_get_contents(base_path('README.md'));
}
return $readme;
}
@ -22,7 +24,9 @@ class IndexController
public function json(Request $request)
{
return json(['code' => 0, 'msg' => 'ok']);
$assets = Db::table('asset')->where('scan_time', null)->count();
return json(['code' => 0, 'msg' => 'ok','data'=>$assets]);
}
}

View File

@ -26,7 +26,11 @@
"require": {
"php": ">=7.2",
"workerman/webman-framework": "^1.5.0",
"monolog/monolog": "^2.0"
"monolog/monolog": "^2.0",
"illuminate/database": "^8.83",
"illuminate/pagination": "^8.83",
"illuminate/events": "^8.83",
"symfony/var-dumper": "^5.4"
},
"suggest": {
"ext-event": "For better performance. "

2077
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -12,4 +12,25 @@
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
return [];
return [
// 默认数据库
'default' => 'mysql',
// 各种数据库配置
'connections' => [
'mysql' => [
'driver' => 'mysql',
'host' => '127.0.0.1',
'port' => 3306,
'database' => 'kunkun_shagain_c',
'username' => 'kunkun_shagain_c',
'password' => 'JcAT8frcGfrrrJBN',
'unix_socket' => '',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => true,
'engine' => null,
],
],
];