Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dex-admin
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haojie
dex-admin
Commits
f26de20d
Commit
f26de20d
authored
Jun 03, 2023
by
haojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
2cfbd446
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
routes/console.php
+17
-0
No files found.
routes/console.php
View file @
f26de20d
...
@@ -17,3 +17,20 @@
...
@@ -17,3 +17,20 @@
Artisan
::
command
(
'inspire'
,
function
()
{
Artisan
::
command
(
'inspire'
,
function
()
{
$this
->
comment
(
Inspiring
::
quote
());
$this
->
comment
(
Inspiring
::
quote
());
})
->
purpose
(
'Display an inspiring quote'
);
})
->
purpose
(
'Display an inspiring quote'
);
// 清除 opcache 全部缓存
Artisan
::
command
(
'clear-all:opcache'
,
function
()
{
opcache_reset
();
$this
->
comment
(
'OPcache 所有缓存已清除'
);
})
->
purpose
(
'Clear all OPcache'
);
// 清除掉最近一次更新文件的缓存
Artisan
::
command
(
'clear:opcache'
,
function
()
{
exec
(
'git diff --name-only HEAD~ HEAD'
,
$output
);
foreach
(
$output
as
$file
)
{
$path
=
base_path
(
$file
);
opcache_invalidate
(
$path
,
true
);
}
dd
(
'刷新完成'
);
})
->
purpose
(
'Clear OPcache'
);
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