Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
webman-blog
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
魏洲
webman-blog
Commits
fe90594f
Commit
fe90594f
authored
May 15, 2022
by
wolfcode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
9ab5c3b3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
2 deletions
+27
-2
.env
.env
+1
-1
InstallCheck.php
app/middleware/InstallCheck.php
+23
-0
middleware.php
config/middleware.php
+3
-1
No files found.
.env
View file @
fe90594f
APP_DEBUG =
fals
e
APP_DEBUG =
tru
e
DB_HOST = 127.0.0.1
DB_HOST = 127.0.0.1
DB_PORT = 3306
DB_PORT = 3306
...
...
app/middleware/InstallCheck.php
0 → 100644
View file @
fe90594f
<?php
namespace
app\middleware
;
use
Webman\MiddlewareInterface
;
use
Webman\Http\Response
;
use
Webman\Http\Request
;
/**
* Class InstallCheck 博客程序首次安装检测
* @package app\middleware
*/
class
InstallCheck
implements
MiddlewareInterface
{
public
function
process
(
Request
$request
,
callable
$next
)
:
Response
{
$lock_file
=
base_path
()
.
DIRECTORY_SEPARATOR
.
'extend'
.
DIRECTORY_SEPARATOR
.
'install.lock'
;
if
(
!
file_exists
(
$lock_file
))
{
}
return
$next
(
$request
);
}
}
\ No newline at end of file
config/middleware.php
View file @
fe90594f
...
@@ -12,4 +12,6 @@
...
@@ -12,4 +12,6 @@
* @license http://www.opensource.org/licenses/mit-license.php MIT License
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
*/
return
[];
return
[
\ No newline at end of file
''
=>
[
app\middleware\InstallCheck
::
class
],
];
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment