Showing 41-60 of 166 items.

REST API and null values in XML

Created 9 years ago by marko60 marko60, updated 9 years ago by marko60 marko60. 0 comments

I have been working on a REST API using the excellent tools provided by Yii2. My problem was that I have to differentiate between empty values and null values. In other words, <elem></elem> is different from null as it represents an empty string. Also, although some use <elem/> to represent a null value it should still be interpreted as an empty string. In other cases, the absence of the eleme...

0 0
0
Viewed: 26 105 times
Version: 2.0
Category: Tips

Yii2 GridView Sorting and Searching with a Junction Table Column(Many to Many Relationship)

Created 9 years ago by Amjad Khan Amjad Khan, updated 9 years ago by Amjad Khan Amjad Khan. 4 comments

Following is the table structure

tblgroups

CREATE TABLE IF NOT EXISTS `tblgroups` (
  `id` int(11) NOT NULL,
  `groupname` varchar(150) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1=Acitve,2=Inactive',
  `date` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

tblcontacts

4 2
7
Viewed: 98 010 times
Version: 2.0
Category: Tutorials

Yii2: How to create/develop a new extension using Composer locally without version control or Git

Created 9 years ago by Wade Shuler Wade Shuler, updated 7 years ago by jwerner jwerner. 3 comments

Using a version control system, like Git, is nice. However, when building an extension from scratch and loading it via Composer, it adds a lot of pain in the butt steps. You have to commit your changes, update composer to pull them over, then notice there is an error, fix, commit, update. repeat.. I don't want all my baby steps under Git. Sure, I could edit my commit history, but c'mon. Just let m...

7 0
6
Viewed: 43 072 times
Version: 2.0
Category: How-tos

How To: Custom Client Validation On Checkbox Toggle and Optional Input Field

Created 10 years ago by Wade Shuler Wade Shuler, updated 10 years ago by Wade Shuler Wade Shuler. 0 comments

I just chased my tail around for a bit today. I got lost with setting the status of all inputs, and banging my head on why the "validate" function just wasn't working.

Relational Query - Lazy Loading and Eager Loading in Yii 2.0

Created 10 years ago by softark softark, updated 7 years ago by samdark samdark. 0 comments

It's well known that there are Lazy Loading approach and Eager Loading approach in the relational query. But it's very important to know how the Eager Loading approach works in Yii 2. It has changed drastically from that of Yii 1.1, and there are common misunderstandings about it in the community.

11 0
6
Viewed: 67 301 times
Version: 2.0
Category: Tutorials