라라벨의 package를 사용해서 만든 것 같습니다.
https://github.com/laravel-enso/CommentsManager
vendor로 등록되는 구조이니.. 라라벨에서 메인 코어는 나눠도 각각 패키지별로 업그레이드가 편하게
할 수 있을 것 같습니다.
morphs를 잘 이해해야 되네요
CommentsTable
public function up()
{
Schema::create('comments', function (Blueprint $table) {
$table->increments('id');
$table->morphs('commentable');
$table->text('body');
$table->integer('created_by')->unsigned()->nullable();
$table->foreign('created_by')->references('id')->on('users');
$table->integer('updated_by')->unsigned()->nullable();
$table->foreign('updated_by')->references('id')->on('users');
$table->timestamps();
});
}
CommentUserPivotTable
public function up()
{
Schema::create('comment_user', function (Blueprint $table) {
$table->integer('comment_id')->unsigned()->index();
$table->foreign('comment_id')->references('id')->on('comments')
->onDelete('cascade');
$table->integer('user_id')->unsigned()->index();
$table->foreign('user_id')->references('id')->on('users')
->onDelete('cascade');
$table->primary(['comment_id', 'user_id']);
});
}
게시글 목록
| 번호 | 제목 |
|---|---|
| 100 | |
| 99 | |
| 96 | |
| 93 | |
| 92 | |
| 91 |
기타
Snippet
|
| 90 |
기타
Vue.js
|
| 89 |
라라벨
라라벨 이커머스
|
| 88 |
라라벨
Awesome Laravel
|
| 87 | |
| 86 | |
| 85 | |
| 83 | |
| 82 | |
| 78 | |
| 71 | |
| 70 |
라라벨
라라벨 관련
|
| 66 | |
| 65 |
라라벨
라라벨 동영상 강좌
|
| 62 | |
| 61 |
라라벨
라라벨 5.4
1
|
| 58 | |
| 57 |
일반
구글 트렌드
|
| 55 | |
| 52 | |
| 49 | |
| 43 | |
| 41 |
기타
마젠토 디렉토리 구조
|
| 37 | |
| 36 |
코드이그나이터
요즘 코드이그나이터 공부하고 있습니다.
3
|
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기