How to Create and Pass data to Template in CakePHP 4

Template in the CakePHP 4 is a .php file where define the HTML layout of the page. Template files automatically get loaded on the page. For this need to create files in a specific pattern.

From Controller, you can pass data to the template file.

In this tutorial, I show how you can create template files and pass values from the controller to the template in CakePHP 4 project.

How to Create and Pass data to Template in CakePHP 4

Read more

How to Check if user is Online or Offline using Offline.js

Offline.js is a JavaScript library to detect if a user is connected to the internet or not. It displays an alert message when the internet connection is lost similar to Facebook and Gmail.

It has different types of themes like – Default, Chrome, Dark, Hubspot, and Side to display alert message.

By default, it uses favicon.ico to check the internet connection but you can change it.

In this tutorial, I show how you can check if user is online or offline using the Offline.js library.

How to Check if user is online or offline using Offline.js

Read more