Update existing and thiladhun date fix

This commit is contained in:
2020-08-21 02:10:41 +05:00
parent 005f5105b9
commit be04822ce3
10 changed files with 11 additions and 13 deletions

View File

@@ -48,7 +48,7 @@ class ScrapeAdduLiveCommand extends Command
foreach ($articles as $article) {
// Attach the relationship between source and article and return the curren article instance
$articleModel = $source->articles()->firstOrCreate(["guid" => $article["guid"]],
$articleModel = $source->articles()->updateOrCreate(["guid" => $article["guid"]],
[
"title" => $article["title"],
"url" => $article["url"],

View File

@@ -47,7 +47,7 @@ class ScrapeAvasCommand extends Command
foreach ($articles as $article) {
// Attach the relationship between source and article and return the curren article instance
$articleModel = $source->articles()->firstOrCreate(["guid" => $article["guid"]],
$articleModel = $source->articles()->updateOrCreate(["guid" => $article["guid"]],
[
"title" => $article["title"],
"url" => $article["url"],

View File

@@ -47,7 +47,7 @@ class ScrapeDhenCommand extends Command
foreach ($articles as $article) {
// Attach the relationship between source and article and return the curren article instance
$articleModel = $source->articles()->firstOrCreate(["guid" => $article["guid"]],
$articleModel = $source->articles()->updateOrCreate(["guid" => $article["guid"]],
[
"title" => $article["title"],
"url" => $article["url"],

View File

@@ -47,7 +47,7 @@ class ScrapeMihaaruCommand extends Command
foreach ($articles as $article) {
// Attach the relationship between source and article and return the curren article instance
$articleModel = $source->articles()->firstOrCreate(["guid" => $article["guid"]],
$articleModel = $source->articles()->updateOrCreate(["guid" => $article["guid"]],
[
"title" => $article["title"],
"url" => $article["url"],

View File

@@ -48,7 +48,7 @@ class ScrapeSunCommand extends Command
foreach ($articles as $article) {
// Attach the relationship between source and article and return the curren article instance
$articleModel = $source->articles()->firstOrCreate(
$articleModel = $source->articles()->updateOrCreate(
["guid" => $article["guid"]],
[
"title" => $article["title"],

View File

@@ -48,7 +48,7 @@ class ScrapeThePressCommand extends Command
foreach ($articles as $article) {
// Attach the relationship between source and article and return the curren article instance
$articleModel = $source->articles()->firstOrCreate(["guid" => $article["guid"]],
$articleModel = $source->articles()->updateOrCreate(["guid" => $article["guid"]],
[
"title" => $article["title"],
"url" => $article["url"],

View File

@@ -48,7 +48,7 @@ class ScrapeThiladhunCommand extends Command
foreach ($articles as $article) {
// Attach the relationship between source and article and return the curren article instance
$articleModel = $source->articles()->firstOrCreate(
$articleModel = $source->articles()->updateOrCreate(
["guid" => $article["guid"]],
[
"title" => $article["title"],

View File

@@ -48,7 +48,7 @@ class ScrapeVoiceCommand extends Command
foreach ($articles as $article) {
// Attach the relationship between source and article and return the curren article instance
$articleModel = $source->articles()->firstOrCreate(["guid" => $article["guid"]],
$articleModel = $source->articles()->updateOrCreate(["guid" => $article["guid"]],
[
"title" => $article["title"],
"url" => $article["url"],