Articles in category "how-tos", sorted by viewsX
Displaying 51-60 of 354 result(s).

How to validate CSRF token with session

Created 4 years ago by yangmlsHow-tos2 comments – viewed 50,821 times – ( +23 ) – version 1.1
First of all, You must change component config to enable the default Yii CSRF validation.
tags: CSRF, session

Write & use a custom Component in Yii2.0

Created 2 years ago by sirin kHow-tos4 comments – viewed 49,515 times – ( +18 ) – 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)

Sort and filter a custom or composite CGridView column - that may even contain data from different tables.

Created 2 years ago by Gerhard LiebenbergHow-tos2 comments – viewed 49,163 times – ( +6 / -1 ) – version 1.1
I have a table (account) which contains "General Ledger" accounts. Each account has its own account_description - such as 'inventory', 'sales', etc.

Using CJuiDatePicker for CGridView filter

Created 4 years ago by softarkHow-tos21 comments – viewed 48,978 times – ( +27 ) – version 1.1
We can use a CJuiDatePicker for a CGridView inline filter.

Moving project code outside of webroot (plus multiple project support)

Created 5 years ago by Steve FriedlHow-tos8 comments – viewed 48,337 times – ( +22 / -1 ) – version 1.1
Yii's by-default directory organization works well enough, but there are several steps one can take that improve the security and serviceability of the system, especially in the context of multiple Yii projects on the same machine (including multiple versions of the same project).
tags: config, security

Upload image and content using AJAX and Store it in different table

Created 2 years ago by SelvakumarHow-tos1 comment – viewed 47,497 times – ( +3 ) – version 1.1
We all know how to upload the content and images at the same time with refreshing the page. And uploading the images using Ajax we have faced some issues, here i have fixed the issues and both content and photos are uploaded using Ajax. And both content and images are stored in the different tables

Reliable Alternative For Yii::app()->request->isAjaxRequest AND Adding Data To Ajax Form With JS

Created 5 years ago by ibo_sHow-tos2 comments – viewed 47,213 times – ( +15 / -1 ) – version 1.1
In this How-To I'll show you:

How to use GridView with AJAX

Created 2 years ago by Antonio RamirezHow-tos6 comments – viewed 45,209 times – ( +14 ) – version 2.0
With the adoption of PJax on Yii2 things  have change quite a bit with GridView when it comes to work with them in AJAX mode. It will probably be confusing at the beginning, but then you will soon realize how powerful the new approach is.
tags: yii2, pjax, widget

How to send emails using SMTP

Created 2 years ago by robregonmHow-tos2 comments – viewed 44,832 times – ( +8 ) – version 2.0
Follow @robregonm
tags: yii2, email, mail, mailer, smtp

Install, update and use Yii with WAMP server

Created 4 years ago by mrsHow-tos5 comments – viewed 44,297 times – ( +5 / -1 ) – version 1.1
Here I am describing how you can install and update Yii in WAMP sever.