This example demonstrates how to return the first row or record from those returned in CakePHP.
CakePHP, CakePHP4
This example shows you how to skip CSRF checks in CakePHP (when you have it globally enabled), for prefixes with 'Api'
CakePHP, CakePHP4
This example shows you how to use a model (e.g. $this->Load('Model') ) from within a component, so you can use models like you would in a native controller.
cakephp4, Components
CakePHP 4 Using an app.php or app_local.php Variable in Components or Controllers
CakePHP
This CakePHP 4 component lets you easily handle cookies. This example sets a unique ID cookie.
CakePHP, PHP
Use an alternative prefix in CakePHP4. For example, you can have separate folders for different functionality by user role, and you can use this method to separate functionality (actions / methods) for specific purposes, in separate controllers.
CakePHP, CakePHP4
Joining a single table on multiple fields in CakePHP 4, for example, join the users table on created_by and modified_by fields.
CakePHP 4, CakePHP
CakePHP4 Mailer Usage - Gmail - Email Transport Example with CakePHP 4.
CakePHP, CakePHP4
This example shows how to the get name of the controller or method in CakePHP3
CakePHP3, CakePHP
How to fix the 1366 incorrect string value "\xE2\x80\x8B} ... error.
MySql / MariaDB
If you have been using GMail's "less secure" feature to send SMTP emails from your website, you've probably noticed as of May 30, 2022 that it's no longer working. here's a solution.
Support
Use this example to sort by a specific value in a field within your table, then sort by other fields.
MySql / MariaDB
Get a Unique ID in PHP
PHP
This example shows you how to get the referring page, so you can provide your user with a link to their last page.
CakePHP
This demonstrates how to lengthen or shorten the session timeout for a logged-in user, in CakePHP. This functionality controls when the user's session times out.
CakePHP, CakePHP4, CakePHP3, CakePHP2