createPost( $this->title, $this->text, $this->images, $this->publish_date, $this->primary_attachments_mode ); DB::table('posts_vk_posts')->insert( [ 'post_id' => $this->post_id, 'vk_post_id' => $vk_post['post_id'], 'unchange_time_after' => Carbon::now()->addWeek(), ] ); } catch (\Exception $e) { Log::channel('vk')->error('Failed to create VK post', ['error' => $e->getMessage()]); throw $e; // Перебрасываем исключение для повторной попытки } } }