Implement three public methods in YII

Source: Internet
Author: User
Implement three common methods in YII: Yii framework

In YII, we need to implement three public methods. can you give me some ideas? because I have been working on the foundation for more than two months, I just started development as YII. I have no idea at all.
1. give a thumbs-up to resources in blogs, forums, videos, and other sections, such as posts, articles, and videos.
2. the above resources must be shared.
3. you can set tags for resources when sending resources by yourself.
These methods can be written in components. what classes can be inherited based on basic modification?


Reply to discussion (solution)

For Yii beginners, you can first take a look at the basic tutorial and try to use the AR model. in this way, you can first create a posts table to store the public part of the published information, in this way, all resources can be generated using gii in a basic model and all the code of the model and CURD. then, a resource type is set based on posts and IDs are associated with different resource tables, as for labels, you can set another table and associate it with it.

The zlike method has been completed, and the AR model has been completed, so it is almost time to tag.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.