安装引导程序
This commit is contained in:
parent
69ef6e9355
commit
5a06a7511e
|
|
@ -26,10 +26,10 @@ class AdminServiceProvider extends ServiceProvider
|
|||
*/
|
||||
public function boot()
|
||||
{
|
||||
$uri = request()->getRequestUri();
|
||||
if (Str::startsWith($uri, "/installer")) {
|
||||
if(!installed()) {
|
||||
return;
|
||||
}
|
||||
$uri = request()->getRequestUri();
|
||||
load_settings();
|
||||
$this->loadRoutesFrom(__DIR__ . '/../Routes/admin.php');
|
||||
|
||||
|
|
|
|||
|
|
@ -564,3 +564,8 @@ function add_action($hook, $callback, int $priority = 20, int $arguments = 1)
|
|||
{
|
||||
Eventy::addAction($hook, $callback, $priority, $arguments);
|
||||
}
|
||||
|
||||
function installed()
|
||||
{
|
||||
return file_exists(storage_path('installed'));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,8 +39,7 @@ class PluginServiceProvider extends ServiceProvider
|
|||
*/
|
||||
public function boot()
|
||||
{
|
||||
$uri = request()->getRequestUri();
|
||||
if (Str::startsWith($uri, "/installer")) {
|
||||
if(!installed()) {
|
||||
return;
|
||||
}
|
||||
$manager = app('plugin');
|
||||
|
|
|
|||
|
|
@ -34,10 +34,10 @@ class ShopServiceProvider extends ServiceProvider
|
|||
*/
|
||||
public function boot()
|
||||
{
|
||||
$uri = request()->getRequestUri();
|
||||
if (Str::startsWith($uri, "/installer")) {
|
||||
if(!installed()) {
|
||||
return;
|
||||
}
|
||||
$uri = request()->getRequestUri();
|
||||
$this->loadRoutesFrom(__DIR__ . '/../Routes/shop.php');
|
||||
|
||||
load_settings();
|
||||
|
|
|
|||
Loading…
Reference in New Issue