Skip to main content
SidsProjectImpact

Back to all posts

How to Get Cookies In October CMS?

Published on
7 min read
How to Get Cookies In October CMS? image

Best Cookie Plugins to Buy in August 2026

1 Air Wick Plug in Scented Oil Refill, 5 ct, Brown Sugar and Vanilla, Air Freshener, Essential Oils, Fall Scent, Fall decor

Air Wick Plug in Scented Oil Refill, 5 ct, Brown Sugar and Vanilla, Air Freshener, Essential Oils, Fall Scent, Fall decor

  • INDULGE IN THE SCENT OF FRESH VANILLA COOKIES WITH BROWN SUGAR.
  • ENJOY UP TO 300 DAYS OF LONG-LASTING FRAGRANCE AT LOW SETTING!
  • COMPATIBLE WITH ALL AIR WICK WARMERS AND INFUSED WITH ESSENTIAL OILS.
BUY & SAVE
$15.65
Air Wick Plug in Scented Oil Refill, 5 ct, Brown Sugar and Vanilla, Air Freshener, Essential Oils, Fall Scent, Fall decor
2 Yankee Candle ScentPlug Refill for Plug in Air Fresheners, Scented Oil Refills, Long Lasting Home Fragrance, Christmas Cookie (Pack of 4)

Yankee Candle ScentPlug Refill for Plug in Air Fresheners, Scented Oil Refills, Long Lasting Home Fragrance, Christmas Cookie (Pack of 4)

  • HOLIDAY SCENT: BUTTERY VANILLA COOKIE AROMA FOR FESTIVE CHEER!
  • LASTS 30 DAYS: LONG-LASTING FRAGRANCE KEEPS YOUR SPACE FRESH!
  • QUICK SETUP: EASY INSERT FOR INSTANT FRAGRANCE IN ANY ROOM!
BUY & SAVE
$29.99
Yankee Candle ScentPlug Refill for Plug in Air Fresheners, Scented Oil Refills, Long Lasting Home Fragrance, Christmas Cookie (Pack of 4)
3 Glade PlugIns Refills Air Freshener Starter Kit, Scented and Essential Oils for Home and Bathroom, Cookie Caramel Rush, 0.67 Fl Oz, 1 Warmer + 1 Refill

Glade PlugIns Refills Air Freshener Starter Kit, Scented and Essential Oils for Home and Bathroom, Cookie Caramel Rush, 0.67 Fl Oz, 1 Warmer + 1 Refill

  • TRANSFORM YOUR SPACE WITH SWEET COOKIE CARAMEL RUSH FRAGRANCE!
  • CREATE HOLIDAY CHEER WITH OUR LIMITED EDITION FESTIVE SCENTS!
  • ENJOY ADJUSTABLE WARMTH AND LONG-LASTING, COZY AROMAS!
BUY & SAVE
$18.99
Glade PlugIns Refills Air Freshener Starter Kit, Scented and Essential Oils for Home and Bathroom, Cookie Caramel Rush, 0.67 Fl Oz, 1 Warmer + 1 Refill
4 Glade PlugIns Refills Air Freshener, Scented and Essential Oils for Home and Bathroom, Cookie Caramel Rush, 3.35 Fl Oz, 5 Count

Glade PlugIns Refills Air Freshener, Scented and Essential Oils for Home and Bathroom, Cookie Caramel Rush, 3.35 Fl Oz, 5 Count

  • INDULGE IN RICH COOKIE CARAMEL RUSH: VANILLA & CARAMEL BLISS!
  • TRANSFORM YOUR SPACE WITH FESTIVE SCENTS FROM OUR HOLIDAY COLLECTION.
  • EXPERIENCE ADJUSTABLE WARMTH AND LONG-LASTING COZY FRAGRANCES!
BUY & SAVE
$39.99
Glade PlugIns Refills Air Freshener, Scented and Essential Oils for Home and Bathroom, Cookie Caramel Rush, 3.35 Fl Oz, 5 Count
5 Yankee Candle ScentPlug Refill for Plug in Air Fresheners, Scented Oil Refills, Long Lasting Home Fragrance, Christmas Cookie (Pack of 6)

Yankee Candle ScentPlug Refill for Plug in Air Fresheners, Scented Oil Refills, Long Lasting Home Fragrance, Christmas Cookie (Pack of 6)

  • ENJOY BUTTERY VANILLA SCENT WITH OUR HOLIDAY SUGAR COOKIE FRAGRANCE.
  • LASTS UP TO 30 DAYS FOR CONTINUOUS FRESHNESS IN ANY ROOM.
  • EFFORTLESS SETUP WITH REFILLABLE YANKEE CANDLE SCENTPLUG BASES.
BUY & SAVE
$44.99
Yankee Candle ScentPlug Refill for Plug in Air Fresheners, Scented Oil Refills, Long Lasting Home Fragrance, Christmas Cookie (Pack of 6)
6 Yankee Candle ScentPlug Refill, Christmas Cookie Scented Oil, Plug-in Air Freshener for Home Fragrance, Long-Lasting Holiday Bakery Aroma, Cozy Kitchen Scent, 0.625 Fl Oz (Pack of 1)

Yankee Candle ScentPlug Refill, Christmas Cookie Scented Oil, Plug-in Air Freshener for Home Fragrance, Long-Lasting Holiday Bakery Aroma, Cozy Kitchen Scent, 0.625 Fl Oz (Pack of 1)

  • COZY, INVITING AROMA OF BAKED GOODS FOR HOLIDAY GATHERINGS.
  • LONG-LASTING FRAGRANCE REFILLS FOR WEEKS OF CONSISTENT SCENT.
  • ADJUSTABLE INTENSITY PERFECT FOR ANY ROOM SIZE AND PREFERENCE.
BUY & SAVE
$15.50
Yankee Candle ScentPlug Refill, Christmas Cookie Scented Oil, Plug-in Air Freshener for Home Fragrance, Long-Lasting Holiday Bakery Aroma, Cozy Kitchen Scent, 0.625 Fl Oz (Pack of 1)
7 Yankee Candle ScentPlug Refill for Plug in Air Fresheners, Scented Oil Refills, Long Lasting Home Fragrance, Sparkling Cinnamon, Red Apple Wreath, Balsam & Cedar, Christmas Cookie (Variety Pack)

Yankee Candle ScentPlug Refill for Plug in Air Fresheners, Scented Oil Refills, Long Lasting Home Fragrance, Sparkling Cinnamon, Red Apple Wreath, Balsam & Cedar, Christmas Cookie (Variety Pack)

  • 30-DAY FRAGRANCE: ENJOY LONG-LASTING SCENTS, KEEPING SPACES FRESH!

  • FESTIVE AROMAS: EMBRACE COZY HOLIDAY VIBES WITH SPARKLING CINNAMON!

  • VARIETY OF SCENTS: CHOOSE FROM CHRISTMAS COOKIE, BALSAM, AND MORE!

BUY & SAVE
$29.99
Yankee Candle ScentPlug Refill for Plug in Air Fresheners, Scented Oil Refills, Long Lasting Home Fragrance, Sparkling Cinnamon, Red Apple Wreath, Balsam & Cedar, Christmas Cookie (Variety Pack)
8 The Candle Daddy Cereal Milk - Cookie Cereal Version Scented Wax Melt - 1 Pack - 2 Ounces - 6 Cubes

The Candle Daddy Cereal Milk - Cookie Cereal Version Scented Wax Melt - 1 Pack - 2 Ounces - 6 Cubes

  • RELIVE SWEET MEMORIES WITH OUR NOSTALGIC COOKIE CEREAL MILK SCENT!
  • PERFECT GIFT FOR ANY OCCASION-SHOW YOU CARE WITH A THOUGHTFUL MELT!
  • TRANSFORM ANY SPACE WITH AMAZING AROMAS THAT COMPLEMENT YOUR DECOR!
BUY & SAVE
$6.99
The Candle Daddy Cereal Milk - Cookie Cereal Version Scented Wax Melt - 1 Pack - 2 Ounces - 6 Cubes
9 Uanvaha Food Decorative Night Light Chocolate Chip Cookie Funny Dessert Plug-in Nightlight Energy Saving 0.5W LED Lighting for Boys Girls Men Women

Uanvaha Food Decorative Night Light Chocolate Chip Cookie Funny Dessert Plug-in Nightlight Energy Saving 0.5W LED Lighting for Boys Girls Men Women

  • SAVE ENERGY WITH OUR 0.5W LED NIGHT LIGHT-PERFECT FOR EVERY ROOM!

  • AUTO SENSOR ENSURES EFFORTLESS DARKNESS-TO-LIGHT TRANSITIONS NIGHTLY.

  • IDEAL GIFT FOR ALL AGES, ADDING CHARM TO ANY HOME DECOR.

BUY & SAVE
$9.99
Uanvaha Food Decorative Night Light Chocolate Chip Cookie Funny Dessert Plug-in Nightlight Energy Saving 0.5W LED Lighting for Boys Girls Men Women
+
ONE MORE?

To get cookies in October CMS, you can follow these steps:

  1. Import Illuminate\Cookie\CookieJar and Illuminate\Cookie\CookieServiceProvider in your class file.

use Illuminate\Cookie\CookieJar; use Illuminate\Cookie\CookieServiceProvider;

  1. Register the CookieServiceProvider in the register() method of your plugin or module's service provider.

$this->app->register(CookieServiceProvider::class);

  1. Use the CookieJar class to set a cookie with the desired values. You can do this in your component's onRun() method or wherever it is appropriate.

$cookieJar = app(CookieJar::class); $cookieJar->queue('cookie_name', 'cookie_value', $minutes); // Replace 'cookie_name' and 'cookie_value' with your desired values, and $minutes with an integer representing the cookie duration in minutes. $cookieJar->queue('another_cookie', 'another_value', $minutes); // You can set multiple cookies in the same request.

  1. To retrieve the cookie values, you can use the Cookie facade in your component's code.

use Illuminate\Support\Facades\Cookie;

...

$cookieValue = Cookie::get('cookie_name'); // Replace 'cookie_name' with the name of the cookie you want to retrieve.

Note: Make sure you have set the cookie before trying to retrieve it using the Cookie facade.

By following these steps, you can set and retrieve cookies in your October CMS project.

How to create a plugin in October CMS?

To create a plugin in October CMS, you need to follow these steps:

  1. Install October CMS: Follow the official installation guide to set up a local development environment for October CMS.
  2. Create a Plugin: Navigate to the plugins directory in your October CMS installation. Inside the plugins directory, create a new directory for your plugin. For example, if your plugin is named "MyPlugin", create a directory named "MyVendor/MyPlugin".
  3. Define the Plugin: Inside the plugin directory, create a file named Plugin.php. This file will define the plugin and its properties. Here is an example of a Plugin.php file:
'My Plugin', 'description' => 'Description of my plugin', 'author' => 'My Vendor', 'icon' => 'icon-leaf' \]; } } 1. **Register the Plugin**: Inside the Plugin.php file, add the register() method to register your plugin: public function register() { // ... } public function boot() { // ... } In the `register()` method, you can register components, widgets, or any other functionality your plugin provides. In the `boot()` method, you can register event listeners, apply middleware, or perform any other operations needed during the plugin's bootstrapping phase. 1. **Define Routing**: To create routes for your plugin, you can define them inside the boot() method using the Route facade. Here's an example of adding a route for a plugin: public function boot() { Route::get('/my-plugin', function() { return 'Hello from My Plugin!'; }); } 1. **Define Components and Widgets**: To add components or widgets to your plugin, create components and widgets directories inside your plugin directory. Then, create the necessary files for your components or widgets inside these directories. 2. **Extend Functionality**: You can extend the functionality of October CMS by utilizing its various features, such as models, controllers, [form](https://wpcrux.com/blog/how-to-create-a-contact-form-in-october-cms) widgets, and more. Refer to the official documentation for detailed instructions on implementing different functionalities. 3. **Install and Test the Plugin**: Navigate to the October CMS backend, go to the "Settings" section, and select "Updates & Plugins". Click "Check for updates" to see the list of available plugins. Find your plugin in the list and click "Install" to install it. Once installed, you can test and use your plugin. These are the basic steps to create a plugin in October CMS. It's important to refer to the official October CMS documentation for more advanced functionality and best practices. What is the role of Twig in October CMS? ---------------------------------------- Twig is a templating engine that is used in October CMS to render dynamic content and generate HTML output. It acts as the view layer in the Model-View-Controller (MVC) architectural pattern. The role of Twig in October CMS is to provide a syntax and set of features that allow developers to separate the presentation logic from the business logic of the application. It allows developers to define reusable templates that are populated with data from the application's models and controllers. Twig templates in October CMS can include conditional statements, loops, filters, and other features that make it easy to manipulate and format data before rendering it in the HTML output. [It also supports template](https://wpcrux.com/blog/how-to-use-partials-in-october-cms-templates) inheritance and includes, which enable developers to create modular and reusable templates. Overall, Twig plays a crucial role in providing a flexible and powerful templating system for building dynamic and customizable web pages in October CMS. What is a component in October CMS? ----------------------------------- In October CMS, a component is a reusable, self-contained piece of code that can be added to a theme or a page to add specific functionality or features. Components allow developers to encapsulate certain functionalities and easily reuse them across different pages or themes. A component consists of a combination of PHP classes and markup files (HTML or Twig) that define its logic and presentation. They can include properties, methods, and event handlers to handle data manipulation or processing, as well as define parametrized settings that can be customized when used in different contexts. Components in October CMS provide a modular way to extend the functionality and flexibility of the CMS by allowing developers to create custom widgets, forms, menus, or any other specific features that can be added to pages or themes. They enable reusability, maintainability, and separation of concerns by encapsulating related code into a single unit. How to create a custom CMS widget in October CMS? ------------------------------------------------- Creating a custom CMS widget in October CMS involves several steps. Here is a step-by-step guide on how to do it: 1. **Create a new plugin**: Open the October CMS command line interface (CLI) tool. Navigate to the plugins folder by running cd plugins. Create a new plugin by running php artisan create:plugin PluginName.VendorName. 2. **Define the widget**: Open the plugin folder in a code editor. Inside the PluginName\\Vendorsname\\Plugin.php file, define the plugin's details such as name and author. Create a new folder named components inside the plugin folder. Inside the components folder, create a new PHP file named CustomWidget.php. In CustomWidget.php, define the widget by extending the Cms\\Classes\\ComponentBase class. 3. **Implement the widget logic**: In CustomWidget.php, implement the onRun() method to define the code that runs when the widget is rendered. Add any additional methods and properties specific to your widget. 4. **Register the widget**: In PluginName\\Vendorsname\\Plugin.php, navigate to the registerComponents() method. Register your widget by adding the following line inside the method: return \[ 'PluginName\\VendorName\\Components\\CustomWidget' => 'customWidget' \]; 5. **Configure the widget in the CMS**: Open your October CMS backend. Go to the CMS section and navigate to the page or layout where you want to use the widget. Add a new dynamic content block (if not already present) and click on the "Insert content" button. Find your custom widget in the list of available widgets and insert it. Configure any properties or options specific to your widget. 6. **Customize the widget's display**: Customize the appearance and layout of your widget using the associated view file. Create a new folder named customwidget inside the components folder. Inside the customwidget folder, create a new PHP file named default.htm. Define the HTML structure and content of your widget in this file. That's it! Your custom CMS widget is now ready to be used and displayed in the October CMS backend. You can repeat these steps to create multiple custom widgets in your plugin.