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. You're so awesome! I do not think I've read anything like that before. So nice to discover another person with unique thoughts on this subject matter. Really.. thanks for starting this up. This site is one thing that is needed on the web, someone with a little originality!

    Reply
  2. Hi! This is kind of off topic but I need some advice from an established blog. Is it tough to set up your own blog? I'm not very techincal but I can figure things out pretty quick. I'm thinking about making my own but I'm not sure where to start. Do you have any ideas or suggestions? Cheers

    Reply
  3. Thanks , I've just been searching for information about this subject for ages and yours is the best I've came upon so far. But, what in regards to the conclusion? Are you positive about the source?

    Reply
  4. Paragraph writing is also a fun, if you know after that you can write otherwise it is complicated to write.

    Reply
  5. Greetings from Los angeles! I'm bored to tears at work so I decided to check out your website on my iphone during lunch break. I enjoy the info you present here and can't wait to take a look when I get home. I'm shocked at how fast your blog loaded on my phone .. I'm not even using WIFI, just 3G .. Anyways, very good blog!

    Reply
  6. Remarkable! Its genuinely remarkable paragraph, I have got much clear idea regarding from this post.

    Reply