Wiki

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

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

Created about a year ago by MadAndHow-tos3 comments – viewed 44,657 times – ( +9 ) – 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.

Custom Autocomplete Display and Value Submission

Created 5 years ago by Antonio RamirezHow-tos6 comments – viewed 44,640 times – ( +14 / -1 ) – version 1.1
How many of us has wondered how to create an autocomplete that will display the names of a related models but do require the id of that selected name to be submitted for model creation/update?

Real-time display of server push data using Server-Sent Events (SSE)

Created 4 years ago by bennounaHow-tos16 comments – viewed 44,635 times – ( +12 ) – version 1.1
There are several methods and techniques that come handy in the case you need to call an external resource periodically or if you are waiting for a server push, but I present here an easy and straightforward one using HTML5's Server-Sent Events (SSE).

How to show ajax delete status in CGridView like flash messages

Created 5 years ago by hasanaviHow-tos12 comments – viewed 44,505 times – ( +25 ) – version 1.1
I've seen many tickets regarding how to show friendly delete confirmation using CGridView's CButtonColumn in ajax request. If you are using relational database, after producing CRUD functionality when you try to delete a record in ajax mode which has child record it can't be deleted and you can see the ajax loader forever. By this way you can't show the users if a record has been successfully deleted or if there are some problem in flash style (setFlash() / getFlash())

Using Bootstrap with LESS

Created 3 years ago by Chris83How-tos1 comment – viewed 43,844 times – ( +14 ) – version 1.1
I discovered Twitter Bootstrap almost two years ago. After trying it out for a while I fell in love with it. It didn't take long before I realized that it would be great to write an extension that allowed developers to start using Bootstrap in their Yii projects. One night I sat down and started writing what later became my now popular bootstrap extension. Now that the extension is quite widely used in the community I felt that it was time to write about how to use Bootstrap to its full potential. If you use the Bootstrap CSS files you're really missing out on some great features. After reading this article you'll be able to take full advantage of Bootstrap using LESS.

How to use YiiBooster TbFileUpload widget

Created 3 years ago by Antonio RamirezHow-tos15 comments – viewed 43,240 times – ( +11 ) – version 1.1
The following wiki is to explain how to make use of the TbFileUpload widget from YiiBooster. I have received a couple of requests and I thought was worth writing a wiki for it.

Single sign on across multiple subdomains

Created 5 years ago by ianarĂ©How-tos10 comments – viewed 43,234 times – ( +32 ) – version 1.1
This had me stumped for a while so I figured it would be nice to share here to avoid others the grief.

Searching and Sorting by Count of Related Items in CGridView

Created 4 years ago by softarkHow-tos13 comments – viewed 43,168 times – ( +31 ) – version 1.1
Let's say we have two models and relation between them:

How to implement cron in Yii 2

Created 2 years ago by hemcHow-tos10 comments – viewed 43,052 times – ( +10 ) – version 2.0
In advance template there is already a file yii. And there is no need to run it as php, it is Linux script.
tags: cron, yii2, console

[Guide] How to actually separate Frontend (User) and Backend (Admin) on Yii2 Advanced

Created about a year ago by Wade ShulerHow-tos2 comments – viewed 42,685 times – ( +17 / -1 ) – version 2.0
I am writing this guide because I struggled to find a resource that included ALL of the necessary steps to completely separate the frontend from the backend. After reading guides like Configuring different sessions for backend and frontend in yii-advanced-app and yii2 configuring different sessions for backend and frontend in yii advanced application template, there are still steps missing. It is funny how the 2nd one says it is an extension of the first one's article. So I guess, my wiki guide here is yet a 3rd and more complete extension of both of them. I also found a few StackOverflow questions and blog posts regarding this topic. None of them fully worked, and must be missing some magic sauce!