mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-04 20:20:52 +08:00
- Add command support for plugin management - Optimize plugin management page layout - Add email copy functionality for users - Convert payment methods and Telegram Bot to plugin system
26 lines
471 B
PHP
26 lines
471 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Traits\HasPluginConfig;
|
|
|
|
/**
|
|
* 插件控制器基类
|
|
*
|
|
* 为所有插件控制器提供通用功能
|
|
*/
|
|
abstract class PluginController extends Controller
|
|
{
|
|
use HasPluginConfig;
|
|
|
|
/**
|
|
* 执行插件操作前的检查
|
|
*/
|
|
protected function beforePluginAction(): ?array
|
|
{
|
|
if (!$this->isPluginEnabled()) {
|
|
return [400, '插件未启用'];
|
|
}
|
|
return null;
|
|
}
|
|
} |