Maybe it looks simple, but some time ago I need some time to find a solution of this case. I finally got it, and I want to share that I also experienced such cases. So that it can make reference.
Maybe it looks simple, but some time ago I need some time to find a solution of this case. I finally got it, and I want to share that I also experienced such cases. So that it can make reference.
There is an issue on Yii2 to redirecting / urls to /frontend/web.
In other words we need a way to hidden /frontend/web from addresses.
We will do this without changing Apache configuration and creating virtual host or setting document root (It's good for share hostings that we have not access to apache.conf)
Let's say you have an internal messaging system in your webapp, and you want to display messages dynamically and real-time to the relevant recipients.
All done, now we can call all the actionProvider actions as controllerID/actionPrefix.actionID. Here is the example:
I normally create a files
folder and I allocate it within my www
one, that is where I keep my css, js, images files. So, even though you can place it where ever you wish and for the sake of the example, I will use the files
folder name.
For best experience,use Chrome.Other browsers may complain here and there.Sorry,no patience to make happy every freaking browser out there!
class Post extends CActiveRecord {
...
}
`
When you list Authors in grid you would like to print the count of posts in column, allow sorting on this column and probably filtering by the count.
Please, note. This article is entirely based on a work done by me colleague developer, who hasn't got account on this webpage and also hasn't got time for writing this article. I'm writing it for him. I will try to forward him any comments that may appear, but can't assure if/when he'll be able to answer. I'm far, far less experienced in Oracle therefore I won't probably be able to help myself.
Some times the core validation rules provided by Yii won't satisfy all your needs, so you'll need to create your very own validation rule.
Gii provides us normally with the following code on the 'actionCreate':
public function actionCreate()
{
$model=new ModelName;
In this article, I will describe how to manage URLs for a Website that has both secure and nonsecure content.
You would find having such a need in most Yii Projects. Your database needs a specific format to store date fields, while you may want to display it in different formats to the users on forms and other views.
Hey guys, I'm hoping other people will find this helpful. Today I went through the process of adding CKEditor to one of my projects, and then integrating KCFinder as the image uploader. It will be used in a CActiveForm, without the use of any crazy weird widgets. All paths are relative, using Yii functions, so this will work no matter where you install. Here it is:
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 dele...
We start slowly and simple...
This had me stumped for a while so I figured it would be nice to share here to avoid others the grief.
This config is built on an Ubuntu 11.04 server. Software is nginx, php-fpm (php5-fpm). For performance, it's recommended to run php-fpm in SOCKET mode, instead of accessing via IP:PORT. That is the method shown below.
We all love the convenient gadget, namely jQuery UI Datepicker as an input element for date. Yii supports it as CJuiDatePicker. Let's see how to use it.
Here is a example on how to use Pjax with GridView (yii\grid\GridView) and ActiveForm (yii\widgets\ActiveForm) widgets in Yii2.