makeFilePath(); return view('excelRecharge.page', $this->resultData()); } /** * 创建目录 */ private function makeFilePath() { if (!is_dir(storage_path($this->path))) { mkdir(storage_path($this->path), 0777); } } private function resultData() { return [ 'loveOpen' => $this->lovePluginStatus(), 'loveName' => $this->loveName(), ]; } private function loveName() { if ($this->lovePluginStatus()) { return SetService::getLoveName(); } return '爱心值'; } private function lovePluginStatus() { return app('plugins')->isEnabled('love'); } }