This is wiki page is useful if you are trying to build a customized REST API in Yii2.0
This is wiki page is useful if you are trying to build a customized REST API in Yii2.0
I have two tables called hospitals and departments. I have a junction table between them which holds the departments in each hospital. But sometimes I need a list of "All hospitals with All possible departments" - regardless of whether they are linked in the junction table or not.
This How-To is useful if you are planning to move the Yii vendor directory outside the default location.
This article tries to describe the practical techniques of searching by a HAS_MANY relation using ActiveRecord of Yii 2.0.
There are situations in which Active Record will generate nonsense queries from what a nieve Yii user might think is reasonable code. One such situation is a CActiveDataProvider
using CDbCriteria
to get data from parent and 1:n child table with a condition on the child table.
Have you ever wanted to use an auto-complete field to look up a user or some other data, but want the database ID of that user or data returned as well so that you can more easily perform some function when the form is submitted? Thanks to Yii's CAutoComplete widget and [jQuery's Autocomplete plugin](http://plugins.jquery.com/project/jq-autocomp...
This wiki has been replaced by Use crypt() for password storage.
some times we want to show the serialNo on cgridview .
This wiki is a work in progress.
Application configuration determines how an Yii application should behave, because it is the only parameter passed in the entry script. An application, on the other hand, needs to behave differently under different circumstances. For example, an application may need different configurations when running in production mode, development mode and testing mode; In a team development environment, each...
After adding proper form to the main layout, like:
With yii you're able to create ajax requests and updates easily. But most times you always want to show a loading indicatior to your user.
This tutorial shows how to use a model to save and validate related (MANY_MANY) models.
I've found useful to have a step by step reference guide to work with Git with most used commands, feel free to update it with useful information you may find interesting too.
If we want to set meta tags on a per page (controller-action) basis, we may use the clientScript application component.
If you like the things to be short and clear, then you can skip right to a short summary of instructions at the end of this article.
p.s. latest version of this tutorial is always available unter the docs/ folder of the User Management Module.
Remember-filters-gridview is one of the must-use extension on all of my project. However, it lacks of storing the page and sort variables of the grid view.
Assume we have many categories and many posts.