mirror of
				https://github.com/v2board/v2board.git
				synced 2025-10-31 09:21:46 +08:00 
			
		
		
		
	update
This commit is contained in:
		| @@ -38,6 +38,9 @@ class V2boardInit extends Command | |||||||
|      */ |      */ | ||||||
|     public function handle() |     public function handle() | ||||||
|     { |     { | ||||||
|  |         if (\File::get(base_path() . '/.lock')) { | ||||||
|  |             abort(500, 'V2board 已安装,如需重新初始化请删除目录下.lock文件'); | ||||||
|  |         } | ||||||
|         \Artisan::call('key:generate'); |         \Artisan::call('key:generate'); | ||||||
|         \Artisan::call('config:cache'); |         \Artisan::call('config:cache'); | ||||||
|     	DB::connection()->getPdo(); |     	DB::connection()->getPdo(); | ||||||
| @@ -56,5 +59,6 @@ class V2boardInit extends Command | |||||||
| 				DB::select(DB::raw($item)); | 				DB::select(DB::raw($item)); | ||||||
| 			} catch (\Exception $e) {} | 			} catch (\Exception $e) {} | ||||||
|         } |         } | ||||||
|  |         \File::put(base_path() . '/.lock', time()); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user