The Code You Will Love

Convert Dashes to Underscores in URLs automatically in CI4

Posted on: Friday November 22, 2024

dashes to underscore in ci4 url Step 1: Create a Custom Router Create a custom router that converts dashes to underscores in controller methods. File Path: app/Controllers/Router.php [...]

Read More

URI Segment in CI4

Posted on: Thursday November 21, 2024

url segment in ci4 [crayon-6767fc08c0efc337093117/] [...]

Read More

Redirect in CI4

Posted on: Tuesday November 19, 2024

Redirect with a Flash Message To pass data (like success or error messages) during a redirect, you can use session flashdata. Example: Set flashdata in the controller before redirecting: [...]

Read More

Flashdata (Temporary Session Data)

Posted on: Tuesday November 19, 2024

Flashdata is temporary session data that is available for the next request only. Example: Setting Flashdata [crayon-6767fc08c102f334597469/] Example: Retrieving Flashdata [...]

Read More

Session in CI4

Posted on: Tuesday November 19, 2024

Storing Data in Session Use the session() helper function or the Config\Services::session() method to access the session instance. Storing Grouped Session Data Use the session()->set() method to [...]

Read More

Routes in CI4

Posted on: Tuesday November 19, 2024

Example of Routes (app\Config\Routes.php): [crayon-6767fc08c117f320990397/] Using parameter (:any) [crayon-6767fc08c1182636296254/] [...]

Read More

React Setup

Posted on: Saturday October 26, 2024

Required: Install node npm   Step 1: Install React Router (For Navigate to pages:page link) Open your terminal and navigate to your React project directory. Then, run the following command to [...]

Read More

WorPress WooCommerce Security

Posted on: Tuesday October 22, 2024

STEP 1 : .htaccess [crayon-6767fc08c1526170078334/] Important! Change xxx.xxx.xxx.xxx to IP address you wish to allow access xmlrpc.php or remove this line completely.   STEP 2 : Disable [...]

Read More

Whitelist IP in WHM

Posted on: Saturday October 19, 2024

To whitelist an IP address in WHM (Web Host Manager), follow these steps: Step-by-Step Guide: Log into WHM: Open your WHM panel by visiting https://your-server-ip:2087. Log in using your root [...]

Read More

Create React Project

Posted on: Thursday September 26, 2024

To create a new React project using Create React App (CRA), follow these steps: Step 1: Install Node.js Ensure you have Node.js installed on your machine. You can download it from the official [...]

Read More
Translate »