Hi,
By popular demand, today I will be revisiting my previous Yii Framework 2 Getting Started Guide and updating it with what is currently available in the Yii Framework 2 Repository. Provide here is an super simple example CRUD application that will help you get started using the framework.
I would like to share my little experience with Yii to the community in the form of the below small wiki:
In this article i will explain how to customize log activity in database, Imaging you need to save IP user, Url request and user_name in database,But table created by default with Yii only have id,level,category,logtime and message
composer update
does not fetch any new packages (even though the source is updated)composer update
.composer update
earlier, but it was partially done, before you lost network connectivity, and you cannot refresh packages anymore.Note the tag {{homeUrl}}
will be dynamically replaced at runtime.
If you are coming over to Yii 2 from Yii 1.x, you may have already read this useful wiki for creating dependent dropdowns. You can use a similar approach in Yii 2 to do the same. But if you are looking at a prebuilt solution that helps you manage it easier, read along.
Lets say we have two models and relation between them:
Simple Ajax popup view with Ajax link
This wiki explains how to add summary data from related models into your Yii Framework 2.0 gridview with filtering and sorting by the summary columns.
These are functions that I used very often, may helps you!
In this wiki I will show you how to save/update a model with many related model For example: How to set a product to multiple categories only in one post form ?
According to below wiki we could migrate database schema to another database
Few days ago i was playing with TCPF plugin to create a PDF files. Since i have checked few available extension and also checked some forum threads but still i dont get my expected result for PDF file.
Lots of people are asking how to solve it with YII,We think its difficult with YII. But its easy to solve . There is no database triggers needed . we can simply sove it by extending a class(say "RActiveRecord") from CActiveRecord .Then extend all our model classes from that class.
This is another way to view images in your application and I like this way because it's simple and I think it's better performance than other.
When you are handling so many projects and those projects are saved in different repository locations, you may find it very difficult to keep track all the versions and revisions manually and it will be much harder if you are developing in multiple repository branches.
The yii2-detail-view extension offers you an easy way to EDIT and VIEW your model data, toggle these modes, and adds other features. You can read the extension documentation and/or view a demo of this extension, to understand usage.
Awhile ago I was trying to find a database driven CMenu system to add to my web applications. This always seemed to me that it would be a lot easier to manage if it where in a database. So the following is the results of that effort:
Suppose you have Products,Categories and each product belongs in many categories