Components are re-usable bits of code you can call anywhere throughout your application.
CakePHP, CakePHP4
Override the CakePHP maximum of 100 records in pagination.
CakePHP, CakePHP4
Here's a brief few snippets for using sessions in CakePHP4.
CakePHP, CakePHP4
How to use CakePHP Bake Features to generate your models, views (templates) and controllers, automatically!
Cake Bake, Cake Bakery, CakePHP4 Bake
This example shows you how to add HTML to your flash messages. Helpful when you want to add a link in CakePHP flash messages.
Cake4, CAKEPHP 4
This article demonstrates how to login as another user by impersonation, in CakePHP4. This allows administrators to login as another user and test issues with that user.
CakePHP
How to Fix Error: CSRF token from either the request body or request headers did not match or is missing.
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
This example shows you how to create a form, the javascript, and the php to handle resizing images before posting to the php file, which saves the original and resized base-64 standard form fields generated.
Jquery, Javascript
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