File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
app/Http/Controllers/Admin Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ public function update(Request $request)
152
152
$ result ['app_version ' ] = config ('app.version ' );
153
153
$ result ['repository ' ] = $ repository ;
154
154
155
- $ result ['can_update ' ] = false ;
155
+ $ result ['can_update ' ] = true ;
156
156
157
157
if (isset ($ repository ['name ' ])) {
158
158
if ($ repository ['name ' ] != $ result ['app_version ' ]) {
@@ -226,7 +226,16 @@ public function updateFile(Request $request)
226
226
227
227
$ path = storage_path ('app/ ' ).'public/uploads/files/fullstack-backend- ' .$ version ;
228
228
229
- Helper::copyDirToDir ($ path ,base_path ());
229
+ $ dirs = Helper::getDir ($ path );
230
+ $ files = Helper::getFileLists ($ path );
231
+
232
+ foreach ($ dirs as $ key => $ value ) {
233
+ Helper::copyDirToDir (storage_path ('app/ ' ).'public/uploads/files/fullstack-backend- ' .$ version .'/ ' .$ value ,base_path ());
234
+ }
235
+
236
+ foreach ($ files as $ key => $ value ) {
237
+ Helper::copyFileToDir (storage_path ('app/ ' ).'public/uploads/files/fullstack-backend- ' .$ version .'/ ' .$ value ,base_path ());
238
+ }
230
239
231
240
return $ this ->success ('程序更新成功! ' );
232
241
}
You can’t perform that action at this time.
0 commit comments