| xqd
@@ -126,12 +126,21 @@ class SettingController extends Controller
|
|
|
if(!\File::isDirectory($dir)) {
|
|
|
\File::makeDirectory($dir, 493, true);
|
|
|
}
|
|
|
+
|
|
|
+ $items = BaseAttachmentModel::where('class', '分享图片测试')->get();
|
|
|
+
|
|
|
+ foreach($items as $item) {
|
|
|
+ if(Storage::disk('upload')->exists($item->path)) {
|
|
|
+ Storage::disk('upload')->delete($item->path);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
$image->save($path);
|
|
|
|
|
|
BaseAttachmentModel::create([
|
|
|
'path' => $full_path,
|
|
|
'name' => $name,
|
|
|
- 'class' => '分享图片',
|
|
|
+ 'class' => '分享图片测试',
|
|
|
'size' => $size,
|
|
|
]);
|
|
|
|