onestartup网站的博客

0.0.5 2019-02-13 17:02 UTC

This package is not auto-updated.

Last update: 2024-09-20 02:44:52 UTC


README

onestartup/blog 是一个用于网站的模块化博客

安装

  • 在终端运行以下命令
composer require onestartup/blog
  • 在 config/app.php 的 providers 数组中添加 ServiceProvider 后运行
Onestartup\Blog\BlogServiceProvider::class,
  • 运行迁移
php artisan migrate
  • 将以下行添加到 app/User.php
public function entries()
{
    return $this->hasMany('Onestartup\Blog\Model\Entry', 'user_id');
}
  • 运行发布视图的命令
php artisan vendor:publish --provider="Onestartup\Blog\BlogServiceProvider"
  • 运行发布配置文件的命令
php artisan vendor:publish --tag=config 
  • 运行 serv
php artisan serve
  • 在此路由中测试管理员用户
https://:8000/admin/blog/entry
  • 在此路由中测试
https://:8000/blog