Update (seeder): add fitness, home & living
This commit is contained in:
@@ -60,7 +60,8 @@ public static function handle(ShopeeSellerScrape $shopee_seller_scrape)
|
||||
'Beauty',
|
||||
'Technology',
|
||||
'Home & Living',
|
||||
'Health & Fitness'
|
||||
'Health',
|
||||
'Fitness'
|
||||
];
|
||||
|
||||
$ai_output = OpenAI::writeProductArticle($excerpt, $photos, $categories);
|
||||
|
||||
30
database/seeders/ShopeeFitnessCategorySeeder.php
Normal file
30
database/seeders/ShopeeFitnessCategorySeeder.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Category;
|
||||
use App\Models\ShopeeSellerCategory;
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class ShopeeFitnessCategorySeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$shopee_sellers = ["abugarcia.os", "acrossports.os", "adidasmy.os", "aibifitness.os", "alikhsansports.os", "alonefire.os", "alpsport.os", "altrarunningmy.os", "ambroscorp", "antamalaysia.os", "antaofficial.os", "aonijie.os", "apacsofficialflagshipstore", "aqsupport.os", "asicsmalaysia.os", "athletelq.os", "avivaactive.os", "brooks.os", "badmintonfactory", "blenderbottle.os", "bullzenfishing.os", "bushnell.os", "carlton.os", "camelcrownoutdoor.os", "cameloutdoor.os", "capbarbellasia.os", "chaopai.os", "cinellimalaysia.os", "cm2.os", "coleman.os", "consinaofficial.os", "crazeecausa", "dahon.os", "decathlon.official.store", "desiregym.os", "deutermy.os", "dhs.os", "diadoramy.os", "durakingoutdoorandsports.os", "donicmalaysia.os", "drskin.os", "egosports.os", "endurancesports", "expfishing.os", "prokennex.os", "felet.os", "fenin.os", "wums0310.os", "tokushima.os", "fitnessconcept.os", "gattimalaysia", "gearupmy.os", "gintell", "gomexus.os", "gosengs.sports.world", "gsgill.os", "db3686", "hedgrenmy.os", "herschelmy.os", "hiervnofficial.my", "hoopsstation.os", "hydroflaskmy.os", "hypergear.os", "inbike.os", "pa20085566.os", "jakroomy.os", "johnsonfitness.os", "jdtstore", "kalibre.os", "kastking.os", "kingdomfishing.my", "kingsmith.os", "kshbicycle.os", "kuckreja.os", "kawasakibadmintonmalaysia", "lasonaofficial.my", "lining.os", "litepro.my", "lixada.os", "lpmy.os", "lpm.os", "montanic.os", "matsumotostore", "mavllos.os", "maxboltmy", "maxfind.os", "maxx.os", "mobigarden.os", "mcdavidmy.os", "minelabmalaysia", "mobigarden.kj.os", "spacey.os", "montbell.os", "monton.malaysia.os", "moonaz.os", "naturehike.os", "naturehikeglobal.my", "langgou.my", "newbalancemy.os", "nicronmy", "ogevkin.my", "ogawacorp.", "ogival.os", "one.two.fit", "onetwofitofficial.my", "originalclassicmy.os", "ortuseightofficialshop.os", "osprey.os", "exploreroutfitter.os", "outpost.os", "outsidemy.os", "outtobe.os", "ovicx.os", "peak.os", "peaksportsmy.os", "pgmgolf.os", "pinknproper.os", "prestigesports.os", "proapparel.os", "probiker.my", "pronic.os", "prosun.os", "protech.os", "protechbysupercourt", "prspsports", "pumamy.os", "purefishingmalaysia.os", "rcl.os", "rainbowstyle333.os", "rapalamy.os", "reechooutdoor.my", "rigidfitness.os", "ripcurlmy.os", "rockbros.os", "cycling1.my", "rstaichi.os", "runninglabmy.os", "oceansportmy", "s2hcyclemall.os", "salomonmy.os", "sanctbandactive.os", "santic.os", "seahawkfishing.os", "selleitaliamalaysia", "shimanomalaysiacycling.os", "shimanofishingmy.os", "shipwreckskateboards.os", "skelcoremy.os", "kelvenchang.os", "slmbicycle.os", "smilingshark.os", "xunmenglong.my", "sneakerlabmy.os", "snugsport.os", "sofirnlight.my", "sougayilang.os", "sparkprotein.os", "whaledream563", "speedoofficial.os", "sportplanet.os", "sportsdirectmy.os", "stridermalaysia.os", "sunparadisemy", "18138419167.my", "swimfitmy.os", "themarathonshop.os", "thenorthfacemy.os", "tankebicycle.os", "tcetacklesestore", "tecnifibremy", "tenxionofficial.os", "cinemark0621.os", "thirddayco.os", "thkfish.os", "treesandsunoutdoor", "trs.os", "trudivemalaysiasingapore", "tulldent.os", "twinbrothers.os", "underarmourmy.os", "uponumbrella.os", "uscamel1.my", "velo88.os", "victorbysinma", "victormalaysia.os", "victorinox.os", "vigorfitness.os", "viq.os", "vsmash.os", "warrixofficialju.my", "westbiking.os", "worldofsports.os", "xtiger.os", "xcorefitness.os", "xinpower.os", "xiom.os", "xtep.os", "yinhe.os", "yonex.os", "youngofficial.os", "zeromarketplace", "zttobike.my", "2xu.os", "361degrees.os", "910sportswear.os"
|
||||
];
|
||||
|
||||
$category = Category::where('country_locale_slug','my')->where('name','Fitness')->first();
|
||||
|
||||
foreach ($shopee_sellers as $seller)
|
||||
{
|
||||
$shopee_seller_category = new ShopeeSellerCategory;
|
||||
$shopee_seller_category->seller = $seller;
|
||||
$shopee_seller_category->category_id = $category->id;
|
||||
$shopee_seller_category->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
30
database/seeders/ShopeeHomeLivingCategorySeeder.php
Normal file
30
database/seeders/ShopeeHomeLivingCategorySeeder.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Category;
|
||||
use App\Models\ShopeeSellerCategory;
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class ShopeeHomeLivingCategorySeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$shopee_sellers = ["aands.os", "acerpure.os", "acsonmalaysia.os", "aicook.my", "airbotmalaysia", "alphaofficialstore", "aolonmalaysia.os", "aolon.os", "aqara.os", "bacony.my", "bearofficialstore.os", "butterflymalaysia.os", "bacfree.os", "bearglobal.my", "beko.os", "bestdenkimy", "biolomix.os", "biolomixlocal.my", "bissellmy", "blueair.os", "boschhomeappliancesmy.os", "boschmy", "bossmankaden", "brunomalaysia", "corvan.os", "charlcomy", "chiqmalaysia", "valeo.os", "cookraze", "cornell.os", "cosori.os", "courts.os", "cuckoo.os", "delonghi.os", "desahome.os", "daikinmy.os", "daytech.os", "deerma.malaysia", "delfino.os", "amazefanbrandshop.my", "delonghi.os", "panasonic888.os", "deroma.os", "dibea.os", "domus18", "dreamecopperconnect", "dreamemy.os", "officialdysonstore", "ecoluxemalaysia", "ecovacs.os", "edgewall.os", "eksexprez", "elba.os", "electricalshopmy", "electrolux.os", "electrova", "shinghing", "erainetmy", "eroc.my", "etouchplus.os", "europlus.os", "ezilah.os", "faber.os", "fanzomalaysia", "fotile.os", "gaabor.os", "gell.os", "giselleha", "gogeousofficial", "haier.os", "hanriver.malaysia.my", "hanriver.official", "hanabishi.os", "haniertv", "hatarimalaysia", "hericaine.os", "hetch", "hibrew.os", "hiconos", "hiraki.os", "hisensecertifiedstore.os", "hitachi.os", "homeessentialmall.os", "hitec.os", "hizero.os", "hodekt.official.my", "homeessentialmall.os", "huashengonlineshop", "huromofficial", "igadgets", "ilife.os", "imaxx", "innofoodstore", "instantpot.os", "irisohyama.os", "irobot.os", "isonicofficialstore", "jabenmalaysia", "jafairsolution.os", "jamaystore.my", "jeeteemalaysia.os", "jhhomeappliances", "jimmy.os", "jisulife.my", "wendykao.os", "joyamios", "tenkaryohin", "kadonio.my", "kaizendenkimy", "baolijie123.my", "kgcadvance", "khind.os", "khindborneo.os", "kimviento.os", "kimviento.my", "kitchenaid.os", "konkacreative", "konkadirect.os", "kpielectrical", "kronoshop", "kuvings.os", "lebensstil.os", "lemax.official", "levoit.os", "lg.os", "lionmas", "morphyrichards.os", "mayer.os", "morgan.kings", "mbh.os", "maxiestore", "maxiestore", "meckmy.os", "megraos", "miui.os", "mmxmalaysia", "muzen.os", "nakadagroup.os", "mynarwal", "nescafedolcegusto.os", "nesh.os", "sharkninjaofficial", "njoi.os", "norviamalaysia", "olayksmy.os", "onehomeappliance", "itsasomarketing", "onemoon.os", "philips.my", "panasonic.malaysia", "panasonic.authorised.partner", "panasonic.elite", "panasonic.partner", "panasonicsignaturemall", "pensonic", "pensonic", "perysmith", "philipstv.os", "picogram.os", "proscenic.os", "retekess.my", "rezo.os", "riino.os", "rinnai.os", "robam.os", "roborockmalaysia", "rubine.os", "russelltaylors.os", "selamat.os", "sonystore.os", "sakura.os", "samsungappliancesos", "samsungbrandstoremy.os", "samugiken.os", "samview.os", "sanus.os", "scottmiller", "sensonic.my", "shibuifujiaire", "shimonomalaysia.os", "simplusmalaysia", "sincero.os", "singermy", "skmagicmy.os", "skyworth.os", "smartlifestyle99", "smartmi.os", "snfonline", "sodaxpress", "soundteohmy.os", "sterramy", "sunatur", "sureloc.os", "swissthomas.os", "switchbot.os", "tbm.os", "tanradio.com", "tanradio.com", "tcl.os", "thebaker.os", "thermomixmalaysia", "tineco.os", "tjean.os", "tonze.my", "toshibatv.os", "urban.home", "uwantmalaysia", "vcomm.os", "viewsonic.os", "vizon.os", "yeedi.os", "yetair", "yilizomana.os", "360smartlife.os"
|
||||
];
|
||||
|
||||
$category = Category::where('country_locale_slug','my')->where('name','Fitness')->first();
|
||||
|
||||
foreach ($shopee_sellers as $seller)
|
||||
{
|
||||
$shopee_seller_category = new ShopeeSellerCategory;
|
||||
$shopee_seller_category->seller = $seller;
|
||||
$shopee_seller_category->category_id = $category->id;
|
||||
$shopee_seller_category->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user