M5: Workerman 常驻服务 + AI 审核/润色插件 + 支付插件(支付宝/微信/沙箱)+ 会员插件(套餐/订阅/付费文章)
This commit is contained in:
@@ -68,12 +68,14 @@ class PluginManager
|
||||
|
||||
public function isEnabled(string $plugin): bool
|
||||
{
|
||||
[$vendor, $name] = array_pad(explode('.', $plugin), 2, $plugin);
|
||||
if (\Illuminate\Support\Facades\Schema::hasTable('plugin_records')) {
|
||||
[$vendor, $name] = array_pad(explode('.', $plugin), 2, $plugin);
|
||||
|
||||
$record = PluginRecord::query()->where('vendor', $vendor)->where('name', $name)->first();
|
||||
$record = PluginRecord::query()->where('vendor', $vendor)->where('name', $name)->first();
|
||||
|
||||
if ($record) {
|
||||
return (bool) $record->enabled;
|
||||
if ($record) {
|
||||
return (bool) $record->enabled;
|
||||
}
|
||||
}
|
||||
|
||||
return in_array($plugin, config('plugins.enabled', []), true);
|
||||
|
||||
Reference in New Issue
Block a user