Database query in view file/template in CodeIgniter 4
Posted on: Friday November 22, 2024
[crayon-67419fc38672e713633940/] [...]
Read MorePosted on: Friday November 22, 2024
[crayon-67419fc38672e713633940/] [...]
Read MorePosted 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 MorePosted on: Thursday November 21, 2024
url segment in ci4 [crayon-67419fc386b15580898483/] [...]
Read MorePosted 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 MorePosted 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 MorePosted 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 MorePosted on: Tuesday November 19, 2024
Example of Routes (app\Config\Routes.php): [crayon-67419fc386dd5754115261/] Using parameter (:any) [crayon-67419fc386dd9135454716/] [...]
Read MorePosted 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 MorePosted on: Wednesday June 5, 2024
<link rel=”stylesheet” href=”<?php echo base_url(); ?>assets/vendors/mdi/css/materialdesignicons.min.css”> assets folder is in public [...]
Read MorePosted on: Wednesday June 5, 2024
Copy index.php & htaccess file from public folder and paste it on root folder. open .htaccess file from root folder Paste below code on top of .htaccess page. [crayon-67419fc386f3d547901657/] [...]
Read More