Add (work): set existing fields to be processed
This commit is contained in:
@@ -145,32 +145,16 @@ public static function handle(int $rss_post_id)
|
||||
$rss_post->keyword_list = implode(',', $words_to_add_in_keyword_list);
|
||||
|
||||
$rss_post->status = 'published';
|
||||
|
||||
if($rss_post->save())
|
||||
{
|
||||
$has_saved_keyword = false;
|
||||
|
||||
$deleted_rpk = RssPostKeyword::where('rss_post_id', $rss_post->id)->delete();
|
||||
|
||||
//dump($words_to_save);
|
||||
|
||||
foreach ($words_to_save as $word_to_save)
|
||||
{
|
||||
|
||||
// * @property int $id
|
||||
// * @property int $rss_post_id
|
||||
// * @property string $type
|
||||
// * @property bool $is_main
|
||||
// * @property string $value
|
||||
// * @property string $value_lowercased
|
||||
// * @property Carbon|null $created_at
|
||||
// * @property Carbon|null $updated_at
|
||||
|
||||
// $words_to_save[] = (object) [
|
||||
// 'type' => 'keyword',
|
||||
// 'value' => $word,
|
||||
// 'value_lowercased' => strtolower($word),
|
||||
// ];
|
||||
|
||||
$new_rpk = new RssPostKeyword;
|
||||
$new_rpk->rss_post_id = $rss_post->id;
|
||||
$new_rpk->type = $word_to_save->type;
|
||||
|
||||
Reference in New Issue
Block a user