安装引导程序
This commit is contained in:
parent
3326be05cd
commit
69ef6e9355
|
|
@ -26,10 +26,13 @@ class AdminServiceProvider extends ServiceProvider
|
||||||
*/
|
*/
|
||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
|
$uri = request()->getRequestUri();
|
||||||
|
if (Str::startsWith($uri, "/installer")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
load_settings();
|
load_settings();
|
||||||
$this->loadRoutesFrom(__DIR__ . '/../Routes/admin.php');
|
$this->loadRoutesFrom(__DIR__ . '/../Routes/admin.php');
|
||||||
|
|
||||||
$uri = request()->getRequestUri();
|
|
||||||
$adminName = admin_name();
|
$adminName = admin_name();
|
||||||
if (!Str::startsWith($uri, "/{$adminName}")) {
|
if (!Str::startsWith($uri, "/{$adminName}")) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ use Beike\Plugin\Manager;
|
||||||
use Beike\Models\AdminUser;
|
use Beike\Models\AdminUser;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
class PluginServiceProvider extends ServiceProvider
|
class PluginServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
|
|
@ -38,6 +39,10 @@ class PluginServiceProvider extends ServiceProvider
|
||||||
*/
|
*/
|
||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
|
$uri = request()->getRequestUri();
|
||||||
|
if (Str::startsWith($uri, "/installer")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
$manager = app('plugin');
|
$manager = app('plugin');
|
||||||
$plugins = $manager->getEnabledPlugins();
|
$plugins = $manager->getEnabledPlugins();
|
||||||
$this->pluginBasePath = base_path('plugins');
|
$this->pluginBasePath = base_path('plugins');
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,12 @@ class ShopServiceProvider extends ServiceProvider
|
||||||
*/
|
*/
|
||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
|
$uri = request()->getRequestUri();
|
||||||
|
if (Str::startsWith($uri, "/installer")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
$this->loadRoutesFrom(__DIR__ . '/../Routes/shop.php');
|
$this->loadRoutesFrom(__DIR__ . '/../Routes/shop.php');
|
||||||
|
|
||||||
$uri = request()->getRequestUri();
|
|
||||||
load_settings();
|
load_settings();
|
||||||
|
|
||||||
if (Str::startsWith($uri, '/admin')) {
|
if (Str::startsWith($uri, '/admin')) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue