mead 1 month ago
parent
commit
fbb404f3b2
1 changed files with 19 additions and 19 deletions
  1. 19 19
      app/Console/Commands/TestCommand.php

+ 19 - 19
app/Console/Commands/TestCommand.php

@@ -75,27 +75,27 @@ class TestCommand extends Command
 
 
             $path = "zhongjingdaketang/{$file['basename']}";
             $path = "zhongjingdaketang/{$file['basename']}";
 
 
-            $resource = Resource::query()->updateOrCreate([
-                'name' => $file,
-                'path' => $path,
-                'disk' => 'public',
-                'original_name' => $file,
-            ], [
-                'url' => Storage::disk('public')->url($path)
-            ]);
+//            $resource = Resource::query()->updateOrCreate([
+//                'name' => $file,
+//                'path' => $path,
+//                'disk' => 'public',
+//                'original_name' => $file,
+//            ], [
+//                'url' => Storage::disk('public')->url($path)
+//            ]);
 
 
 
 
-            Video::query()->updateOrCreate([
-                'course_id' => $course->id,
-                'title' => $video_name,
-                'url' => $resource->id,
-                'short_description' => $video_name,
-                'description' => $video_name,
-                'published_at' => $time,
-            ], [
-                'slug' => Str::random(),
-                'status' => ModelStatusEnum::OK
-            ]);
+//            Video::query()->updateOrCreate([
+//                'course_id' => $course->id,
+//                'title' => $video_name,
+//                'url' => $resource->id,
+//                'short_description' => $video_name,
+//                'description' => $video_name,
+//                'published_at' => $time,
+//            ], [
+//                'slug' => Str::random(),
+//                'status' => ModelStatusEnum::OK
+//            ]);
         }
         }
     }
     }