Articles in Category: yii2

Adding a un-encoded label to an Active Checkbox

When you generate a checkbox using Yii's standard ActiveField mechanism, the label is derived from the attributesLabels in the model class [snippet id=227] The above statement uses the $holiday which was created in the controller using $holiday = Holiday::find();The system will populate the label text from the $article->attributeLabels['flexible'] property and

[more...]

Using Is NOT NULL in query builder

When building where clauses it's not that well documented how to use NOT and NULL . Starting with a simple query: [snippet id=214] If we wanted to select all posts where the content had something in it [snippet id=215] Note the doubles set of square brackets, first before the 'not' and then around the parameters

[more...]

Starting with Yii2

So, if you're anything like me, a busy independent developer, research and training projects always get pushed down to the bottom of that oh-so long list of things to do! So this is the start of a series of posts introducing Yii2 and helping you to get up to speed as quickly as possible

[more...]