Skip to content

Commit

Permalink
尝试适配命令行模式运行的网站
Browse files Browse the repository at this point in the history
  • Loading branch information
ichynul committed Nov 21, 2020
1 parent bacafef commit 5657c5d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ Add a config in `config/admin.php`:
'bind_selecter' => 'a.grid-row-view,a.grid-row-edit,.column-__actions__ ul.dropdown-menu a,.box-header .pull-right .btn-success,.popup',
//layer popup size
'layer_size' => '1100px,98%',
// if run web in `cli` mode ,for example `swoole`,如果是以命令行方式运行网站,如`swoole`
'web_in_cli' => false
]
],

Expand Down
4 changes: 4 additions & 0 deletions src/IframeTabsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ public function register()

protected function inWeb()
{
if (IframeTabs::config('web_in_cli' ,false)) {
return true;
}

$c = request('c', '');

return !$this->app->runningInConsole()
Expand Down

0 comments on commit 5657c5d

Please sign in to comment.