How Can I Add A Post To RainLab.Blog Using My Plugin?
I want to take information from the RSS feeds and transfer it to the RainLab.Blog. I have already created my own plugin I don't understand how to trigger the action of the RainLab.Blog
$AllCategories = 2; // category id $post = new Post(); $post->title = 'testSetPost'; $post->slug = 'testSetPost'; $post->content = '<h1>TEST SET POST</h1>'; $post->excerpt = '<h6>TEST SET POST</h6>'; $post->published_at = '2021-02-05 15:14:23'; $post->published = true; $post->save(); $post->categories()->attach($AllCategories); $file = new File; $file->fromUrl('https://picsum.photos/500/320/?random=1','test-set-post' . '.jpg'); $post->featured_images()->save($file);
- → OctoberCMS Backend Loging Hash Error
- → "failed to open stream" error when executing "migrate:make"
- → OctoberCMS - How to make collapsible list default to active only on non-mobile
- → Create plugin that makes objects from model in back-end
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → How to install console for plugin development in October CMS
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → How to update data attribute on Ajax complete
- → October CMS - Conditionally Load a Different Page