yii
Yii PHP Framework 1.1.x
Yii PHP Framework: Best for Web 2.0 Development yii is a high-performance component-based php framework best for web 2.0 development.
I have been trying to learn Yii without luck. I find Zend Framework, Kohana, Code Igniter among other frameworks much easier to learn than Yii. The documentation also su**s. Can you post links to easy-to-understand and well written tutorials/articles? The official documentation is filled with grammar errors and seems to be rushed...
Source: (StackOverflow)
I'm a little bit confused about the purpose of components and extensions folders in protected/
Please clarify.
Source: (StackOverflow)
In yii this code works for default sorting:
$dataProvider = new CActiveDataProvider('article',array(
'sort'=>array(
'defaultOrder'=>'id DESC',
),
How default sorting can be set in yii2?
tried below code, but no result:
$dataProvider = new ActiveDataProvider([
'query' => $query,
'sort' => ['defaultOrder'=>'topic_order asc']
]);
Source: (StackOverflow)
How to include a Javascript or CSS file in Yii Framework?
I want to create a page on my site that has a little Javascript application running, so I want to include .js
and .css
files in a specific view.
Source: (StackOverflow)
How, in Yii, to get the current page's URL. For example:
http://www.yoursite.com/your_yii_application/?lg=pl&id=15
but excluding the $GET_['lg']
(without parsing the string manually)?
I mean, I'm looking for something similar to the Yii::app()->requestUrl
/ Chtml::link()
methods, for returning URLs minus some of the $_GET
variables.
Edit: Current solution:
unset $_GET['lg'];
echo Yii::app()->createUrl(
Yii::app()->controller->getId().'/'.Yii::app()->controller->getAction()->getId() ,
$_GET
);
Source: (StackOverflow)
I've just started using YII and managed to finish my first app. unfortunately, launch day is close and I want this app to be super fast. So far, the only way of speeding it up I've come across, is standard caching. What other ways are there to speed up my app?
Source: (StackOverflow)
I want to add a column at the seventh place in the table, I am using
$this->addColumn('table_name','column_name','type');
adds the column at the end. Is there any way where I can mention the place to add column? Or any after column keyword to add my new column after, for exapmle, password column.
I have learnt aboout migration from Yii Doc
Source: (StackOverflow)
How to create a multi-model form in Yii? I searched the entire documentation of Yii, but got no interesting results. Can some one give me some direction or thoughts about that? Any help will be appreciable.
Source: (StackOverflow)
In my application , I have ApiController
with actionUsers
, So in YII the path becomes api/users
. Now in order to get certain users info , I use the following path api/users/id/10
where 10 is the userID and id
part of the path is basically a GET parameter (api/users?id=10
).
Is there any way to do the same thing without id
part of the path, i.e. I want my path to look like api/users/10
?
Thank you!
Source: (StackOverflow)
In Yii, is there a way to render a single action using a different layout
than that defined for the controller? I have an action that I would like to format differently from the rest, and it's not clear from the documentation if that's possible.
Source: (StackOverflow)
I am a CakePhp programmer. I have decided to try out the Yii framework. I would like to find out in what ways is CakePhp is similar to and different from Yii. Also, is Yii measurably faster than CakePhp as they claim?
Source: (StackOverflow)
I have a table like this:
(id, name, version, text).
(name, version) is unique key, how can i make a rule to validate this.
Source: (StackOverflow)