Skip to content
CODE THE PIXEL

All tutorials

Practical, tested walkthroughs. Filter by topic or level, or sort by what readers found most useful.

61 tutorials
CakePHP

CakePHP 4 Sum column value

This tutorial is a very short one. How to sum the value from a column in a table? Let say you’ve table stocks [id, product, brand, quantity]. To sum the quantity value, you can apply the following code to your controller.

1 min read

CakePHP

CakePHP 4 Telegram Notification

There are many methods of sending notifications to alert the web application administrator or moderator regarding some event in the web application that required attention from them. Technically, most of the notification is sent via email, however, Telegram has a bot that is free to generate and use...

3 min read

CakePHP

CakePHP 4 Covid-19 Tracker Module

This tutorial will demonstrate how to populate data from JSON and CSV format from online sources. Technically the module is not limited to the CakePHP where it also can be applied to other websites or web applications with PHP support.

3 min read

CakePHP

CakePHP 4 Dynamic Input and Save Multiple Entities

When developing a web application, a dynamic input usually will be used to complete some of the tasks such as dynamically inserting data or bulk data. Using jQuery, the dynamic input can be easily generated even there are lots of web articles/tutorials that have been published regarding this matter...

3 min read

CakePHP

CakePHP 4 Insert, Save, Update (hasOne) Associative Data

Insert, save and edit the associative data is a common process in web applications. Most of the related associative data is based on the ‘hasMany’ relationship. However, in this tutorial, the focus is on the ‘hasOne’ relationship e.g user has one profile.

4 min read

CakePHP

CakePHP 4 Slugged Behavior

Slug is the part of the URL that identifies a particular page on the web or system in an easy reading form. Slug is generated based on a specific field such as article title, name, event or any relevant field.

4 min read

Misc

PHP: Estimate Reading Time

This tutorial will show how to create a function to estimate the time for reading some text on your web or application. Many websites have shown the estimated reading time for the users at the same time may be helpful for the users to know how long they need to finish the reading.

1 min read

CakePHP

CakePHP 4 Find, Sort & Count

This tutorial will show how to count registered records in your database using CakePHP 4 method. Basically, the process is to find the records based on the condition and count.

7 min read

CakePHP

CakePHP 4 Export To CSV

This tutorial will show how to export a list of records to .csv file format in CakePHP 4. This function is useful if you want to extract the record into .csv format which can be open using Microsoft Excel. The CakePHP-csv view plugin will be used to generate the .csv file.

3 min read

CakePHP

CakePHP 4 Search Plugin

This tutorial will demonstrate the basic usage of the search plugin in CakePHP 4. Search has become an essential tool in any web information system.

4 min read

CakePHP

CakePHP 4 Site Configuration Using Database

This tutorial will show the step to create a site configuration that is accessible from the form interface and stored in a database table: configurations in CakePHP 4. Basically, this site configuration leverage the global variable configuration to make it accessible throughout the system.

3 min read