Database query in view file/template in CodeIgniter 4
Posted on: Friday November 22, 2024
[crayon-67419aa973991384294950/] [...]
Read MorePosted on: Friday November 22, 2024
[crayon-67419aa973991384294950/] [...]
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-67419aa973f7c190070707/] [...]
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-67419aa9741ea064590559/] 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-67419aa974573404866288/] Using parameter (:any) [crayon-67419aa97457c204810640/] [...]
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-67419aa97469e339053721/] 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-67419aa975174524125726/] [...]
Read More