Yii v2 snippet guide

Comparing #245 with #246

Revision #246 was created by rackycz rackycz on Oct 13, 2020, 8:47:52 PM.

Export to CSV

Content

[...]
- [https://www.yiiframework.com/wiki/250/yii-for-beginners](https://www.yiiframework.com/wiki/250/yii-for-beginners)
- [https://www.yiiframework.com/wiki/462/yii-for-beginners-2](https://www.yiiframework.com/wiki/462/yii-for-beginners-2)

... and today I am beginning with Yii 2 so I will also gather my snippets and publish them here so we all can quickly setup the yii-basic-demo just by copying and pasting. This is my goal - to show how-to without long descriptions.

I was suprised that the Yii 2 demo application does not contain some basic functionalities (like login via DB, translations etc) which must be implemented in the most of web projects so I will focus on them. Plus I will talk about GitLab. 
 
 
If you find any problems in my snippets, let me know, please.

**Prerequisities**
[...]
And right above your GridView place this link:

```
phphtml
<?php
// Pjax::begin(); // If you are using Pjax for GridView, it must start before following buttons.
[...]
**This article had to be split as I reached the max length. Second part is here:**

- [https://www.yiiframework.com/wiki/2558/yii-v2-snippet-guide-ii](https://www.yiiframe
work.com/wiki/2558/yii-v2-snippet-guide-ii)