Table of Contents
在YII中实现三个公共方法
Jun 23, 2016 pm 02:17 PM
Yii framework
在YII中要实现三个公共方法,大家能否给一下思路,因我才2个多月的基础,刚做开发就是YII,完全没思路啊1.对博客,论坛,视频等板块的各种资源,比如帖子,文章,视频等,给出一个赞。
2.要求可以对以上资源进行分享。
3.自己发资源的时候可以给资源设定标签。
这些方法可以写在components中,若是基础改继承哪些类啊
回复讨论(解决方案)
初学Yii,你可以先看下基础的教程,尝试使用AR模型,这样子的话,你可以先建一个posts表,存储发布信息的公共部分,这样所有资源可以在一个基础模型里,利用gii可以生成模型和CURD所有代码,然后再根据posts里设置一个资源类型,利用id关联到不同的资源表,至于标签,可另设一个表,关联过去即可。
赞的方法已经搞好了,AR模型已经弄好了,就差打标签了
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article
How Long Does It Take To Beat Split Fiction?
3 weeks ago
By DDD
Repo: How To Revive Teammates
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
Difficulty in updating caching of official account web pages: How to avoid the old cache affecting the user experience after version update?
3 weeks ago
By 王林
Two Point Museum: All Exhibits And Where To Find Them
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌

Hot tools Tags

Hot Article
How Long Does It Take To Beat Split Fiction?
3 weeks ago
By DDD
Repo: How To Revive Teammates
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
Difficulty in updating caching of official account web pages: How to avoid the old cache affecting the user experience after version update?
3 weeks ago
By 王林
Two Point Museum: All Exhibits And Where To Find Them
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

11 Best PHP URL Shortener Scripts (Free and Premium)

Working with Flash Session Data in Laravel

Simplified HTTP Response Mocking in Laravel Tests

Build a React App With a Laravel Back End: Part 2, React

cURL in PHP: How to Use the PHP cURL Extension in REST APIs

12 Best PHP Chat Scripts on CodeCanyon
