yii2

Home » Blogs » yii2
[Yii2] Cache Speed Comparison

[Yii2] Cache Speed Comparison

Most website developers tend to ignore caching without realizing that it can harm their applications. A one-second delay in access time can mean you're losing customers or users to competitors. Yii2 supports caching in a variety of methods. Supports fragment caching, data caching, page caching, and dynamic content. Cache storage components can be exchanged without having to change the code that uses the cache. In this article, we will make a comparison of cache speeds in several methods....

[yii2] Gii CRUD Template for One Page Ajax

[yii2] Gii CRUD Template for One Page Ajax

Gii is an extension, which provides a web-based code generator to generate models, forms, modules, CRUDs, and so on. By default, the following generators are available Generator Model - Generates an ActiveRecord class for a specified database table.CRUD Generator - Generates controllers and displays that implement CRUD operations (Create, Read, Update, Delete) for the specified model.Controller Generator - Generates a new class of controllers with one or more controller actions and a...

Real-Time Application Dashboard with Yii2, Node.js, MySQL and Chart.js

Real-Time Application Dashboard with Yii2, Node.js, MySQL and Chart.js

In this article we will create a dashboard that can display graphics from data in real-time. The data we use as simulations is the population of a city. If you update your resident data, add or delete it, the graphic will change in real-time without the need to refresh from the page. Before we begin, we need to prepare: Webserver is installed, see How to Configure Virtual Host XAMPP in Windows 10.Yii2 is installed, see How to Install Yii2 Advanced via Composer.Node.js is already installed, see...

[Yii2] Create a RESTful API

[Yii2] Create a RESTful API

An API is software that integrates the applications we create with other applications. The purpose of the creation is to share data between applications that have been integrated. The RESTful API/REST API is the application of the API(Application Programming Interface). REST(Representational State Transfer)is an architecture of communication methods that uses the HTTP protocol for data exchange where this method is often applied in application development. With the aim to make the system have...

[Yii2] How to create and use Functions on Yii2

[Yii2] How to create and use Functions on Yii2

A function is an organized and reusable block of code that is used to perform one related action or achieve a specific result. In creating applications using Yii2, often we need a function to simplify and speed up the creation of the application we are creating. Well... Now how to make the function we create we can access in view or controller. In this article, we will learn how to create and use functions on Yii2 basic and advanced templates. The steps of creating and using functions on Yii2...

Create real-time applications with Node.js and MySQL

Create real-time applications with Node.js and MySQL

In the previous example, Creating a real-time application with Node.js data was not stored permanently. This means that every time the Node server.js we restart, the data will be empty again. To be able to store the inputted data, we must use a database. In this article, we will use the mySQL database that is already quite famous. The same technique you can use if you use another database. The project we will create is a continuation of the project on Creating real-time applications with...

[yii2] How to create new extensions without version or Git controls

[yii2] How to create new extensions without version or Git controls

Using Git in building extensions is great. When using Git, you must load the extension through Composer. Likewise when updating or correcting errors that occur. Of course, this will be troublesome, when the extension made is still in the development stage. To avoid this, we can use composers locally without version or Git controls. So that every code change made can immediately function without the need to update and commit changes through composer or git. Here are the steps to do so: 1....

[yii2] Easy way to hide frontend/web and backend/web

[yii2] Easy way to hide frontend/web and backend/web

Yii2 provides the default URL with frontend/web and backend/web. In actual web applications, URL displays like this are not attractive, so in this case, we need to remove or conceal the frontend/ web from the URL. There are several ways to do this, in the example below we will do it in a way: Using a virtual host Modify Yii2 1. Virtual host apache To hide the frontend /web and backend/web on apache you can do this by creating a virtual host. Open the apache configuration file...

[yii2] How to easily encrypt / decrypt URL parameters

[yii2] How to easily encrypt / decrypt URL parameters

If you want to encrypt URL parameters like this: https://frontend.bardimin/country/view?id=1 Become like this: https://frontend.bardimin/country/view?MN13pDvH/4+94LNY/NXJiDM4YTMwZjc5ZjRmMzA0Y2RjMDRmMjUyYmI5M2Q4MmE2ZDE4ODNkOTdkNzc1MGI3Yzg5OTE4NzVlMzBlMjZmNzkXVSsTf7d1y5a26LK8IcsggrWQi+hW4b0xIFKnIZowSTXZVxu+t2lGyx/skNKFo6g= You can do it easily in yii2. Here are the steps to encrypt/decrypt on URL parameters such as the example above: 1. Create a UrlRule class The first step you...

[yii2] How to Change a GridView Filter from GET to POST

[yii2] How to Change a GridView Filter from GET to POST

In yii1, CGridView, by default, if we perform filters from data using the POST method to request data. While on yii2, the default of the GridView filter uses the GET method. Some users may feel uncomfortable with the GET method for a variety of reasons. To change GridView on yii2 from GET to POST method, you can try it like the following example. 1. View In the view file add the Pjax widget before and after the grid-like this. .............. .............. .............. <?php...

Stay Updated With Latest Articles

Subscribe to Bardimin’s
Free Articles

Receive by email the latest articles about Computers, Hardware and Software. Contains Guide, Troubleshooting, Tips and Tricks.

Follow us

Follow the latest Computer, Hardware and Software articles from Bardimin on Social Media.