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. Very good blog you have here but I was wanting to know if you knew of any forums that cover the same topics talked about here? I'd really love to be a part of group where I can get feedback from other experienced people that share the same interest. If you have any recommendations, please let me know. Kudos!

    Reply
  2. Thanks in support of sharing such a nice thought, article is pleasant, thats why i have read it completely

    Reply
  3. Hello, this weekend is good designed for me, because this point in time i am reading this enormous educational piece of writing here at my house.

    Reply
  4. This is really interesting, You are a very skilled blogger. I have joined your rss feed and look forward to seeking more of your magnificent post. Also, I have shared your site in my social networks!

    Reply
  5. I have read a few good stuff here. Definitely price bookmarking for revisiting. I surprise how a lot effort you set to make one of these wonderful informative web site.

    Reply
  6. You really make it seem so easy with your presentation but I find this matter to be really something which I think I would never understand. It seems too complicated and extremely broad for me. I'm looking forward for your next post, I will try to get the hang of it!

    Reply