링크
https://github.com/magkopian/php-infinite-multi-level-comments (66) http://magkopian.tk/infinite-level-comments/ (132)[code]
CREATE TABLE IF NOT EXISTS `comment` (
`cid` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`sid` smallint(5) unsigned NOT NULL,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`message` varchar(255) NOT NULL,
`parent` smallint(5) unsigned DEFAULT NULL,
`children` tinyint(1) unsigned NOT NULL DEFAULT '0',
`author_name` varchar(40) NOT NULL,
`author_email` varchar(255) NOT NULL,
PRIMARY KEY (`cid`),
KEY `parent` (`parent`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
--
-- Constraints for dumped tables
--
-- Constraints for table `comment`
--
ALTER TABLE `comment`
ADD CONSTRAINT `comment_ibfk_2` FOREIGN KEY (`parent`) REFERENCES `comment` (`cid`);
[/code]
parent, child를 넣어서 무한 커멘트를 만들 수 있는 것 같습니다.
링크2의 데모를 보면 무한 Reply로....
대략적인 구현은 스택오버플로우에서 참조로..
이 방식을 이용하면 무한 카테고리도 가능하겠네요..
morph는 Post(또는 Article)이나 다른 Product등에 커멘트를 달수 있게 해주는 것 같습니다.
multi-level은 parent_id와 child_id로 해서 만들어 지는 것 같습니다.
https://stackoverflow.com/questions/35073613/multi-tiered-comment-system-laravel/35074401
게시글 목록
| 번호 | 제목 |
|---|---|
| 160 |
라라벨
구글 스타일 search
|
| 157 | |
| 156 |
라라벨
라라벨 Socialite
2
|
| 155 | |
| 154 | |
| 153 |
라라벨
Laravel 과 Pusher
|
| 152 | |
| 151 |
라라벨
이메일로 인증하기..
|
| 150 | |
| 149 | |
| 148 |
라라벨
Multi Auth 인증
|
| 147 | |
| 146 |
라라벨
OctoberCMS
|
| 140 | |
| 134 |
라라벨
라라벨로 만든 블로그
5
|
| 133 |
라라벨
게시판 기능 구현해보기입니다.
|
| 132 | |
| 131 | |
| 130 | |
| 129 | |
| 128 | |
| 127 | |
| 126 |
라라벨
라라벨 강좌 #1 - 환경구축
|
| 117 | |
| 116 | |
| 113 | |
| 106 | |
| 105 |
일반
Faker
3
|
| 104 | |
| 101 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기