Wiki

Articles in category "how-tos", sorted by viewsX
Displaying 31-40 of 355 result(s).

Model password confirmation field.

Created 5 years ago by twisted1919How-tos10 comments – viewed 73,312 times – ( +11 / -2 ) – version 1.1
I had some troubles with the password confirmation field for when adding updating user records, so i thought that i should share the way i got it working.

Creating a Dependent Dropdown From Scratch in Yii2

Created 3 years ago by ThePr0f3550rHow-tos4 comments – viewed 73,275 times – ( +8 / -1 ) – version 2.0
I have read http://www.yiiframework.com/wiki/24/creating-a-dependent-dropdown/ (Dependen Dropdown Yii1), but I cant implementation in Yii2 because Yii2 not built-in AJAX functionality hem.. I am search about it and get this statement

Local time zones and locales

Created 6 years ago by Russell EnglandHow-tos9 comments – viewed 72,743 times – ( +14 / -3 ) – version 1.1
Following on from international dates, I also wanted times in the local timezone and format. This was a little more tricky but I think I've got a solution. This is only really appropriate if you have an international app.

Write & use a custom Component in Yii2.0

Created 3 years ago by sirin kHow-tos4 comments – viewed 71,487 times – ( +18 / -1 ) – version 2.0
This is a simple example in Yii2.0 to understand how you can write a custom component and use it inside your app.(basic template)

How to translate and do the translations the easy way

Created 6 years ago by Roman SolomatinHow-tos3 comments – viewed 69,742 times – ( +28 / -3 ) – version 1.1
I wanted to keep all the I18N related translations in separate files, so that I would not need to modify the view files or the model files every time I need to update or fix the translations of application's source language.

Using setFlash for displaying various kind of messages

Created 6 years ago by TrejderHow-tos6 comments – viewed 65,911 times – ( +4 / -6 ) – version 1.1
In this short how-to I will show how to customize setFlash() to display messages (flashes) styled to be success confirmation, error report or notice information. And how to achieve displaying errors in other way.
tags: flash, error, message

How to setup RBAC with a php file

Created 7 years ago by bettorHow-tos17 comments – viewed 65,861 times – ( +26 / -6 ) – version 1.1
In this cookbook I will attempt to explain how to use the lightweight version of Role-Based Access Control using a php file. This version does not use database but a php file and is controlled by CPhpAuthManager class.

How to log and debug variables using CWebLogRoute

Created 6 years ago by Antonio RamirezHow-tos8 comments – viewed 65,816 times – ( +18 / -1 ) – version 1.1
I have seen a couple of articles about how to integrate external libraries to debug our PHP code (i.e. firePHP) but after you read this article you will realize that there is no need for such libraries when using Yii.
tags: Logging

X-Sendfile - serve large static files efficiently from web applications

Created 6 years ago by Maurizio Domba CerinHow-tos5 comments – viewed 65,469 times – ( +26 / -1 ) – version 1.1
Normally when we want users to download a file, that file is put in a folder under the web application root and the web server does the rest.

yii2-app-advanced on single domain (Apache, Nginx)

Created 2 years ago by MadAndHow-tos4 comments – viewed 64,532 times – ( +9 / -1 ) – version 2.0
If you develop rather complex applications with Yii2, you might already be familiar with yii2-app-advanced application template. Well, the template is awesome and provides high flexibility regarding code/configuration sharing among parts of an application.