call([]); $aboutUs = new AboutUs(); $aboutUs->title = 'about us'; $aboutUs->save(); // Add image to the created banner $this->uploadImageForBanner('test_video.mp4.', $aboutUs); } private function uploadImageForBanner(string $imageFileName, $cmsbanner) { $seederDirPath = 'aboutUs/'; // Generate a unique filename for the new image $newFileName = Str::uuid() . '.mp4'; // Storage path for the new image $storagePath = '/aboutUs/' . $newFileName; // Check if the image exists in the seeder_disk if (Storage::disk('seeder_disk')->exists($seederDirPath . $imageFileName)) { // Copy the image from seeder to public $fileContents = Storage::disk('seeder_disk')->get($seederDirPath . $imageFileName); Storage::disk('public_uploads')->put($storagePath, $fileContents); $cmsbanner->filename = $newFileName; $cmsbanner->save(); } } }