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-67419fc386c6e441421243/] 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-67419fc386dd5754115261/] Using parameter (:any) [crayon-67419fc386dd9135454716/] [...]

Read More

csrf in CodeIgniter 4

Posted on: Tuesday June 11, 2024

CSRF/csrf in ci4 Enable CSRF: Go to app/Config/Filters.php  Search for public array $methods and replace with: [crayon-67419fc386e6e474311996/]   Use (Just paste under <from>) : <input [...]

Read More