Website Intro

www.kangxuanpeng.com 网站布局图

index 首页

view
HongXunPan
xxxxxxblogAbout Mecontact
copyright---xxx@ccas
function

blog 博客

view - list 列表页
logonavxx xx xx xx
time8event xx
event xtime7
time6event
time5
time4
time3
time2
time1 ^
time0
view - info 博客详情页
nav
crumbs
title
label..authordate-time
content
^
<prev next>
comment
function

now can use typecho

### about me 个人资料页

my resume base on markdown

### contact 联系方式页

how can contact me:

or u can leave a message on this form

## 安装步骤

git clone https://github.com/HongXunPan/kangxuanpeng.com.git

composer update

php artisan migrate

php artisan migrate --path=database/migrations/blog

composer require encore/laravel-admin "1.5.*"composer update即可

php artisan migrate --path=database/migrations/blog

## MyBlog

模板来自于linpx.cn,基于typecho的 Pinghsu 皮肤,作者是 Chakhsu

### database数据库设计

##### table:posts 文章表

columntypeattributecomment
post_idint(11)PK auto increase文章ID
post_namevarchar(200)default ''文章标题
slugvarchar(100)unique default ''将文章标题转化为URL的一部分,以利于SEO
contenttext 文章内容,存放md格式
author_idint(11)default 0作者id
comment_numint(11)default 0评论数(冗余字段)
created_atint(11)default 0创建时间
updated_atint(11)default 0修改时间
statustinyint(1)default 0草稿or已发布

##### table:comments 评论表

columntypeattributecomment
comment_idint(11)PK auto increase评论ID
post_idint(11)default 0文章ID
contenttext 评论内容
parent_idint(11)default 0父评论id
nick_namevarchar(30)default ''评论者昵称
emailvarchar(50)default ''评论者邮箱
sitevarchar(50)default ''评论者网站
created_atint(11)default 0评论时间
statustinyint(1)default 0状态 删除or正常

##### table:tags 分类表

columntypeattributecomment
tag_idint(5)PK auto increase标签ID
tag_namevarchar(50)default ''标签名称

##### table:post_tag_relations 文章分类的关系表

columntypeattributecomment
post_idint(11)PK1文章ID
tag_idint(5)PK1标签ID

used || finished

wait-use || todo

problem && fix

一对多 hasMany 可以实现 多对多则会报错 hasMany field must be a HasMany or MorphMany relation
多对多通过关系表来实现的,laravel ORM的关联为belongToMany ,laravel不支持这种写法, 可以通过laravel-admin多选框来实现

解决: $form->multipleSelect('tags')->options(TagBlog::all()->pluck('tag_name', 'tag_id'));

给用户分配执行权限,软链 ln -s xxx xxx $HOME/bin/xx

Responses
  1. похвальный сайт https://lolz.guru/market/

    Reply
  2. Howdy! Would you mind if I share your blog with my facebook group? There's a lot of folks that I think would really enjoy your content. Please let me know. Thank you

    Reply
  3. Excellent article! We are linking to this particularly great content on our site. Keep up the good writing.

    Reply
  4. What's up everyone, it's my first go to see at this site, and article is actually fruitful in support of me, keep up posting these types of content.

    Reply
  5. I am in fact thankful to the owner of this web site who has shared this great piece of writing at at this time.

    Reply
  6. Whats up very nice site!! Man .. Excellent .. Amazing .. I'll bookmark your web site and take the feeds additionally? I am glad to seek out so many helpful info right here within the put up, we'd like develop extra strategies in this regard, thanks for sharing. . . . . .

    Reply