Giter Site home page Giter Site logo

summerblue / phphub5 Goto Github PK

View Code? Open in Web Editor NEW
1.9K 1.9K 485.0 20.09 MB

PHPHub Ver 5 is a Forum project Powered by Laravel 5.1, and it is also the project build up PHP & Laravel China community (此项目已弃用)

Home Page: https://laravel-china.org/

PHP 37.25% JavaScript 24.70% HTML 33.63% Shell 0.10% CSS 4.33%
gulp laravel phphub

phphub5's Introduction



macbook

项目概述

PHPHub Laravel 5.1 版本。

运行环境

  • Nginx 1.8+
  • PHP 5.6+
  • Mysql 5.7+
  • Redis 3.0+
  • Memcached 1.4+

开发环境部署/安装

本项目代码使用 PHP 框架 Laravel 5.1 开发,本地开发环境使用 Laravel Homestead

下文将在假定读者已经安装好了 Homestead 的情况下进行说明。如果您还未安装 Homestead,可以参照 Homestead 安装与设置 进行安装配置。

基础安装

1. 克隆源代码

克隆源代码到本地:

> git clone https://github.com/summerblue/phphub5.git

2. 配置本地的 Homestead 环境

1). 运行以下命令编辑 Homestead.yaml 文件:

homestead edit

2). 加入对应修改,如下所示:

folders:
    - map: ~/my-path/phphub5/ # 你本地的项目目录地址
      to: /home/vagrant/phphub5
sites:
    - map: phphub5.app
      to: /home/vagrant/phphub5/public

databases:
    - phphub5

3). 应用修改

修改完成后保存,然后执行以下命令应用配置信息修改:

homestead provision

注意:有时候你需要重启才能看到应用。运行 homestead halt 然后是 homestead up 进行重启。

3. 安装扩展包依赖

> composer install

4. 生成配置文件

> cp .env.example .env

5. 使用安装命令

虚拟机里面:

php artisan est:install

更多信息,请查阅 ESTInstallCommand

6. 配置 hosts 文件

主机里:

echo "192.168.10.10   phphub5.app" | sudo tee -a /etc/hosts

前端工具集安装

代码里自带编译后的前端代码,如果你不想开发前端样式的话,你是不需要配置前端工具集的,可直接跳过直达 链接入口 部分。

1). 安装 node.js

直接去官网 https://nodejs.org/en/ 下载安装最新版本。

2). 安装 Gulp

npm install --global gulp

3). 安装 Laravel Elixir

npm install

4). 直接 Gulp 编译前端内容

gulp

5). 监控修改并自动编译

gulp watch

链接入口

请修改 .env 文件为 APP_ENV=localAPP_DEBUG=true

在开发环境下,直接访问后台地址即可登录 1 号用户。

至此, 安装完成。

扩展包描述

扩展包 一句话描述 在本项目中的使用案例
infyomlabs/laravel-generator Laravel 代码生成器 开发时的 Migration、Model、Controller 都使用此扩展包生成。
orangehill/iseed 将数据表里的数据以 seed 的方式导出 BannersTableSeeder, LinksTableSeeder, CategoriesTableSeeder 和 TipsTableSeeder 使用此扩展包生成。
barryvdh/laravel-debugbar 调试工具栏 开发时必备调试工具。
rap2hpoutre/laravel-logviewer Log 查看工具 生产环境下,使用此扩展包快速查看 Log,已做权限控制。
laracasts/presenter Presenter 机制 以下 Model: User、Topic、Notification 都使用到了 Presenter。
league/html-to-markdown 将 HTML 转换成 Markdown 用户发帖、回复帖子时使用了此扩展包。
erusev/parsedown 将 Markdown 转换成 HTML 用户发帖、回复帖子时使用了此扩展包。
laravel/socialite 官方社会化登录组件 GitHub 登录逻辑使用了此扩展包。
NauxLiu/auto-correct 自动给中英文之间加入合理的空格,纠正专用名词大小写 用户发帖时用此扩展包过滤标题。
Intervention/image 图片处理功能库 用发帖和回复帖子时,图片上传的逻辑使用了此扩展包。
zizaco/entrust 用户组权限系统 整站的权限系统基于此扩展包开发。
VentureCraft/revisionable 记录 Model 的变更日志 以下 Model: User, Topic, Reply, Category, Banner 都用此扩展包记录删除日志。
mews/purifier HTML 白名单过滤器 用户发帖、回复时防止 XSS 过滤。
oumen/sitemap Sitemap 生成工具 本项目的 sitemap 使用此扩展包生成。
spatie/laravel-backup 数据库备份解决方案 本项目的数据库备份使用此扩展包完成。
summerblue/administrator 管理后台解决方案 本项目的后台使用此扩展包开发。
laracasts/flash 简单的 flash messages 用户登录成功、发帖成功后的提示使用此扩展包开发

自定义 Artisan 命令列表

命令 说明
est:install 安装命令,仅支持开发环境下运行,在初次安装才有必要运行。
est:reinstall 重装命令,仅支持开发环境下运行,调用此命令会重置数据库、重置用户身份。

计划任务

此项目的计划任务都以 Laravel 的 任务调度 方式执行。

命令 说明 调用
backup:run --only-db 数据库备份,每 4 小时运行一次,属于 spatie/laravel-backup 的逻辑 php artisan backup:run --only-db
backup:clean 清理过期的数据库备份,每日 1:20 运行,属于 spatie/laravel-backup 的逻辑 php artisan backup:clean

代码生成器日志

本项目使用 infyomlabs/laravel-generator 快速构建项目, 记录这些日志目的为了方便后续开发可以借鉴。

php artisan make:scaffold Appends --schema="content:text,topic_id:integer:unsigned:default(0):index"

php artisan make:scaffold Attentions --schema="topic_id:integer:unsigned:default(0):index,user_id:integer:unsigned:default(0):index"

php artisan make:scaffold Links --schema="title:string:index,link:string:index,cover:text:nullable"

php artisan make:scaffold Replies --schema="topic_id:integer:unsigned:default(0):index,user_id:integer:unsigned:default(0):index,is_block:tinyInteger:unsigned:default(0):index,vote_count:integer:unsigned:default(0):index,body:text,body_original:text:nullable"

php artisan make:scaffold SiteStatuses --schema="day:string:index,register_count:integer:unsigned:default(0),topic_count:tinyInteger:unsigned:default(0),reply_count:integer:unsigned:default(0),image_count:integer:unsigned:default(0)"

php artisan make:scaffold Tips --schema="body:text:nullable"

php artisan make:scaffold Topics --schema="title:string:index,body:text,user_id:tinyInteger:unsigned:default(0),category_id:integer:unsigned:default(0),reply_count:integer:unsigned:default(0),view_count:integer:unsigned:default(0),vote_count:integer:unsigned:default(0),last_reply_user_id:integer:unsigned:default(0),order:integer:unsigned:default(0),is_excellent:tinyInteger:unsigned:default(0),is_wiki:tinyInteger:unsigned:default(0),is_blocked:tinyInteger:unsigned:default(0),body_original:text:nullable,excerpt:text:nullable"

php artisan make:scaffold Topics --schema="user_id:integer:unsigned:default(0),votable_id:integer:unsigned:default(0),votable_type:string:index,is:string:index"

php artisan make:scaffold Users --schema="github_id:integer:unsigned:default(0):index,github_url:string:index,email:string:index:index,name:string:index:index"

php artisan make:scaffold Votes --schema="user_id:integer:unsigned:default(0),votable_id:integer:unsigned:default(0),votable_type:string:index,is:string:index"

php artisan make:scaffold Banners --schema="position:string:index,order:integer:unsigned:default(0):index,image_url:string,title:string:index,description:text:nullable"

php artisan make:scaffold NotificationMailLogs --schema="from_user_id:integer:unsigned:default(0):index,user_id:integer:unsigned:default(0):index,type:string:index,body:text:nullable"

License

使用 PHPHub5 构建,或者基于 PHPHub5 源代码修改的站点 必须 在页脚加上 Powered by PHPHub 字样,并且必须链接到 https://learnku.com 上。必须 在页面的每一个标题上加上 Powered by PHPHub 字样。

在遵守以上规则的情况下,你可以享受等同于 MIT 协议的授权。

或者你可以联系 [email protected] 购买商业授权,商业授权允许移除页脚和标题的 Powered by PHPHub 字样。

phphub5's People

Contributors

artikell avatar aufree avatar jinchun avatar lijinma avatar overtrue avatar ryunpu avatar seaony avatar summerblue avatar zhengjinghua avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phphub5's Issues

访问报错

RuntimeException in EncryptionServiceProvider.php line 29:
No supported encrypter found. The cipher and / or key length are invalid.
in EncryptionServiceProvider.php line 29
at EncryptionServiceProvider->Illuminate\Encryption\{closure}(object(Application), array()) in Container.php line 738
at Container->build(object(Closure), array()) in Container.php line 631
at Container->make('encrypter', array()) in Application.php line 674
at Application->make('encrypter') in Container.php line 842
at Container->resolveClass(object(ReflectionParameter)) in Container.php line 805
at Container->getDependencies(array(object(ReflectionParameter)), array()) in Container.php line 774
at Container->build('App\Http\Middleware\EncryptCookies', array()) in Container.php line 631
at Container->make('App\Http\Middleware\EncryptCookies', array()) in Application.php line 674
at Application->make('App\Http\Middleware\EncryptCookies') in Pipeline.php line 123
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in CheckForMaintenanceMode.php line 44
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Request.php line 97
at Request->handle(object(Request), object(Closure))
at call_user_func_array(array(object(Request), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102
at Pipeline->then(object(Closure)) in Kernel.php line 122
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 87
at Kernel->handle(object(Request)) in index.php line 53
at require_once('/Users/machero/code/phphub/public/index.php') in server.php line 21

安装命令 执行没反应

用的本地搭建的环境,不是用的homestead

windows系统,前面已经复制了.env 编辑了配置,执行了composer install,在下面这一步卡住了,
运行 php artisan est:install
执行到 php artisan migrate --seed 时卡住没反应了

单独执行该命令,报下面的错误

  [Illuminate\Database\QueryException]
  SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `
  revisions` add index `revisions_revisionable_id_revisionable_type_index`(`revisionable_id`, `revisionable_type`))

  [PDOException]
  SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes

php5.5已无法正常安装。

Problem 1
- Installation request for intervention/image 2.3.7 -> satisfiable by intervention/image[2.3.7].
- intervention/image 2.3.7 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
Problem 2
- Installation request for naux/sendcloud 1.1 -> satisfiable by naux/sendcloud[1.1].
- naux/sendcloud 1.1 requires php >=5.6 -> your PHP version (5.5.30) does not satisfy that requirement.
Problem 3
- Installation request for socialiteproviders/manager v2.1.5 -> satisfiable by socialiteproviders/manager[v2.1.5].
- socialiteproviders/manager v2.1.5 requires php ^5.6 || ^7.0 -> your PHP version (5.5.30) does not satisfy that requirement.
Problem 4
- Installation request for socialiteproviders/weixin v2.1.1 -> satisfiable by socialiteproviders/weixin[v2.1.1].
- socialiteproviders/weixin v2.1.1 requires php ^5.6 || ^7.0 -> your PHP version (5.5.30) does not satisfy that requirement.

后台管理

不定时可以访问网站的后台,并且可以操作后台数据(没有干坏事)。

MariaDB Problem

qq 20161215115837
我用的 MariaDB 这个数据库,结果安装的时候除了问题。

大大,开发环境是什么?

我用了ubuntu16.04+php7+homestead0.3+virtualbox-0.5.0.box,一直有各种错误,请问大大具体的开发环境是什么?
谢谢各位大大的指点。

后台删除数据bug

后台在删除数据时,只是在后台显示中删除了,但是在mysql数据库中并没有删除

官网上的bug?

  1. 使用微信登陆后, 再绑定github, 还没跳转的授权页面,就提示 绑定失败:你的 GitHub 账号已被其他用户使用. T_T
  2. 点击了邮件中的激活链接之后, 还是处于未激活状态。

后台回复错误

当点击后台管理回复发生错误

Trying to get property of non-object
in replies.php line 32
at HandleExceptions->handleError('8', 'Trying to get property of non-object', '/home/vagrant/phphub5/config/administrator/replies.php', '32', array('value' => null, 'model' => object(Reply))) in replies.php line 32
at Factory->{closure}(null, object(Reply)) in Column.php line 239
at Column->renderOutput(null, object(Reply)) in DataTable.php line 289
at DataTable->parseOnTableColumns(object(Reply), array('id' => array('raw' => '387', 'rendered' => '387'), 'user' => array('raw' => object(User), 'rendered' => 'veronica.greenfelder'))) in DataTable.php line 253
at DataTable->parseResults(object(Collection)) in DataTable.php line 93
at DataTable->getRows(object(DatabaseManager), array('user' => array('relationship' => true, 'external' => false, 'editable' => true, 'visible' => true, 'setter' => false, 'description' => '', 'value' => '', 'min_value' => '', 'max_value' => '', 'min_max' => false, 'name_field' => 'name', 'options_sort_field' => 'id', 'options_sort_direction' => 'ASC', 'table' => 'users', 'column' => 'id', 'foreign_key' => 'user_id', 'multiple_values' => false, 'options' => array(), 'self_relationship' => false, 'autocomplete' => true, 'num_options' => '10', 'search_fields' => array('CONCAT(id, ' ', name)'), 'constraints' => array(), 'load_relationships' => false, 'title' => '用户', 'type' => 'belongs_to', 'field_name' => 'user', 'hint' => '', 'options_filter' => object(Closure)), 'topic' => array('relationship' => true, 'external' => false, 'editable' => true, 'visible' => true, 'setter' => false, 'description' => '', 'value' => '', 'min_value' => '', 'max_value' => '', 'min_max' => false, 'name_field' => 'title', 'options_sort_field' => 'id', 'options_sort_direction' => 'ASC', 'table' => 'topics', 'column' => 'id', 'foreign_key' => 'topic_id', 'multiple_values' => false, 'options' => array(), 'self_relationship' => false, 'autocomplete' => true, 'num_options' => '10', 'search_fields' => array('CONCAT(id, ' ', title)'), 'constraints' => array(), 'load_relationships' => false, 'title' => '话题', 'type' => 'belongs_to', 'field_name' => 'topic', 'hint' => '', 'options_filter' => object(Closure)), 'is_blocked' => array('relationship' => false, 'external' => false, 'editable' => true, 'visible' => true, 'setter' => false, 'description' => '', 'value' => '', 'min_value' => '', 'max_value' => '', 'min_max' => false, 'title' => '是否被屏蔽', 'type' => 'enum', 'options' => array(array('id' => 'yes', 'text' => '是'), array('id' => 'no', 'text' => '否')), 'field_name' => 'is_blocked', 'hint' => ''), 'body_original' => array('relationship' => false, 'external' => false, 'editable' => true, 'visible' => true, 'setter' => false, 'description' => '', 'value' => '', 'min_value' => '', 'max_value' => '', 'min_max' => false, 'limit' => '0', 'height' => '100', 'title' => '回复内容', 'field_name' => 'body_original', 'hint' => '', 'type' => 'text'), 'vote_count' => array('relationship' => false, 'external' => false, 'editable' => true, 'visible' => true, 'setter' => false, 'description' => '', 'value' => '', 'min_value' => '', 'max_value' => '', 'min_max' => true, 'symbol' => '', 'decimals' => '0', 'thousands_separator' => ',', 'decimal_separator' => '.', 'type' => 'number', 'title' => '查看次数', 'field_name' => 'vote_count', 'hint' => ''))) in viewComposers.php line 29
at AdministratorServiceProvider->{closure}(object(View))
at call_user_func_array(object(Closure), array(object(View))) in Dispatcher.php line 221
at Dispatcher->fire('composing: administrator::index', array(object(View))) in Factory.php line 496
at Factory->callComposer(object(View)) in View.php line 116
at View->renderContents() in View.php line 83
at View->render() in View.php line 161
at View->gatherData() in View.php line 147
at View->getContents() in View.php line 118
at View->renderContents() in View.php line 83
at View->render() in Response.php line 51
at Response->setContent(object(View)) in Response.php line 202
at Response->__construct(object(View)) in Router.php line 1229
at Router->prepareResponse(object(Request), object(View)) in ControllerDispatcher.php line 112
at ControllerDispatcher->Illuminate\Routing{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 139
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102
at Pipeline->then(object(Closure)) in ControllerDispatcher.php line 114
at ControllerDispatcher->callWithinStack(object(AdminController), object(Route), object(Request), 'index') in ControllerDispatcher.php line 67
at ControllerDispatcher->dispatch(object(Route), object(Request), 'Frozennode\Administrator\AdminController', 'index') in Route.php line 203
at Route->runWithCustomDispatcher(object(Request)) in Route.php line 134
at Route->run(object(Request)) in Router.php line 708
at Router->Illuminate\Routing{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 139
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in PostValidate.php line 44
at PostValidate->handle(object(Request), object(Closure))
at call_user_func_array(array(object(PostValidate), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in ValidateModel.php line 27
at ValidateModel->handle(object(Request), object(Closure))
at call_user_func_array(array(object(ValidateModel), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in ValidateAdmin.php line 46
at ValidateAdmin->handle(object(Request), object(Closure))
at call_user_func_array(array(object(ValidateAdmin), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102
at Pipeline->then(object(Closure)) in Router.php line 710
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 673
at Router->dispatchToRoute(object(Request)) in Router.php line 635
at Router->dispatch(object(Request)) in Kernel.php line 236
at Kernel->Illuminate\Foundation\Http{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 139
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in OAuthExceptionHandlerMiddleware.php line 36
at OAuthExceptionHandlerMiddleware->handle(object(Request), object(Closure))
at call_user_func_array(array(object(OAuthExceptionHandlerMiddleware), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in FilterIfPjax.php line 29
at FilterIfPjax->handle(object(Request), object(Closure))
at call_user_func_array(array(object(FilterIfPjax), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in RecordLastActivedTime.php line 17
at RecordLastActivedTime->handle(object(Request), object(Closure))
at call_user_func_array(array(object(RecordLastActivedTime), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in CheckUserIsItBanned.php line 18
at CheckUserIsItBanned->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckUserIsItBanned), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in VerifyCsrfToken.php line 50
at VerifyCsrfToken->handle(object(Request), object(Closure)) in VerifyCsrfToken.php line 23
at VerifyCsrfToken->handle(object(Request), object(Closure))
at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in StartSession.php line 62
at StartSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in EncryptCookies.php line 59
at EncryptCookies->handle(object(Request), object(Closure))
at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in CheckForMaintenanceMode.php line 44
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Request.php line 97
at Request->handle(object(Request), object(Closure))
at call_user_func_array(array(object(Request), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102
at Pipeline->then(object(Closure)) in Kernel.php line 122
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 87
at Kernel->handle(object(Request)) in index.php line 53

安装完毕后直接访问admin 直接跳转到github登录窗口??

php artisan est:install 执行完毕后 登录管理后台:http://phphub5.app/admin 直接转github登录窗口吗?并不是像文档所说 "在开发环境下,直接访问后台地址即可登录 1 号用户。"

另外.env 文件
// Github oauth
CLIENT_ID=eefd4111fbcb0e1d0fb9
CLIENT_SECRET=3dce7078f20bc10a1f6bef559b81787648f1b372

// Github Card
GITHUB_CARD_CLIENT_ID=eefd4111fbcb0e1d0fb9
GITHUB_CARD_CLIENT_SECRET=3dce7078f20bc10a1f6bef559b81787648f1b372

这些CLIENT_ID、CLIENT_SECRET貌似是生产环境的.......

文档页面全部是 404

虽然文档页面可以访问,但是文档页所有的响应状态码都是 404

GET /docs/home HTTP/1.1
Host: laravel-china.org
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
DNT: 1
Referer: https://laravel-china.org/docs/home
Accept-Encoding: gzip, deflate, sdch, br
Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.6,en;q=0.
HTTP/1.1 404 Not Found
Server: nginx/1.11.3
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Cache-Control: no-cache
Date: Thu, 29 Sep 2016 07:55:37 GMT
Set-Cookie: XSRF-TOKEN=***; expires=Thu, 29-Sep-2016 09:55:37 GMT; Max-Age=7200; path=/
Content-Encoding: gzip

关于smartisan/follow

关于smartisan/follow
qq 20160825094358

这个laravel framework 只是5.1, 但是这里需要最新的laravel/laravel,如何跳个这个require dev???谢谢!!!
这个phphub插件需要最新版的laravel,但是phphub使用的 laravel框架只是5.1,那么composer require smartisan/follow老是出错,该如何破?谢谢!

当我运行php artisan migrate --seed的时候出现了问题

php artisan est:init-rbac

                                                                               
  [Illuminate\Database\QueryException]                                         
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'phphub5.users' d  
  oesn't exist (SQL: select * from `users` where `users`.`deleted_at` is null  
   limit 1)                                                                    
                                                                               

                                                                               
  [PDOException]                                                               
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'phphub5.users' d  
  oesn't exist    

Master 的 BLOG_CATEGORY_ID 配置缺失

Master 分支中的 .env.example 文件缺少 BLOG_CATEGORY_ID=8phphub.blog_category_id 没有默认值,主分支中有查询使用了此配置,导致进入个人中心报错。

因为没有 releases,所以只能把 master 应看成 releases 了。

另外,为什么有

  • phphub.blog_category_id
  • app.wiki_topic_id

这样的配置,不放在一起有些困惑,是不是放在一起更好一些。

部署时错误:smartisan/follow

前几天是正常的……回去看了下 Packagist 貌似项目已经被删除了,有可能是这个原因吗?

$ composer install

Problem 1
    - smartisan/follow dev-master requires laravel/laravel >= 5.1 -> no matching package found.
    - smartisan/follow dev-master requires laravel/laravel >= 5.1 -> no matching package found.
    - Installation request for smartisan/follow dev-master -> satisfiable by smartisan/follow[dev-master].

自己已经部署线上环境

改了很多东西 这个开源的项目还不错 就是有的东西没有写清楚 如果有需要的大家一起讨论
线上地址www.php-laravel.com

项目 Clone 下来后,composer install 报错

Resolving dependencies through SAT
Dependency resolution completed in 0.009 seconds
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for socialiteproviders/weixin v2.1.1 -> satisfiable by socialiteproviders/weixin[v2.1.1].
- socialiteproviders/weixin v2.1.1 requires socialiteproviders/manager ~2.1 -> no matching package found.

根据我的判断,应该是 composer.lock 中没有对应的 socialiteproviders/weixin v2.1.1,但是当时是如何安装的?奇怪啊。

我先使用 composer update 跑起来项目。

项目composer install的时候报错

Failed to download overtrue/laravel-follow from dist: The "https://api.github.com/repos/overtrue/laravel-follow/zipball/2ad4d232ccccd1cf4a680794d358d243097b870f" file could not be downloaded (HTTP/1.1 302 Found) Now trying to download from source

windows按照安装文档操作 ,操作到npm install --no-bin-links报错,求高手指点

D:\websites\phphub5>npm install --no-bin-links
npm WARN unmet dependency D:\websites\phphub5\node_modules\laravel-elixir\node_modules\browserify requires glob@'^4.0.5' but will load
npm WARN unmet dependency D:\websites\phphub5\node_modules\laravel-elixir\node_modules\glob,
npm WARN unmet dependency which is version 5.0.15
npm WARN unmet dependency D:\websites\phphub5\node_modules\laravel-elixir\node_modules\gulp-less\node_modules\accord requires glob@'7.0.3' but will load
npm WARN unmet dependency D:\websites\phphub5\node_modules\laravel-elixir\node_modules\glob,
npm WARN unmet dependency which is version 5.0.15
npm WARN unmet dependency D:\websites\phphub5\node_modules\laravel-elixir\node_modules\gulp-phpspec\node_modules\gulp-logger requires chalk@'^0.5.1' but will load
npm WARN unmet dependency D:\websites\phphub5\node_modules\laravel-elixir\node_modules\gulp-phpspec\node_modules\chalk,
npm WARN unmet dependency which is version 1.1.3
npm WARN unmet dependency D:\websites\phphub5\node_modules\laravel-elixir\node_modules\gulp-phpspec\node_modules\gulp-logger requires gulp-util@'^3.0.0' but will load
npm WARN unmet dependency D:\websites\phphub5\node_modules\laravel-elixir\node_modules\gulp-phpspec\node_modules\gulp-util,
npm WARN unmet dependency which is version 2.2.20
npm WARN unmet dependency D:\websites\phphub5\node_modules\laravel-elixir\node_modules\gulp-phpspec\node_modules\jshint requires minimatch@'2.0.x' but will load
npm WARN unmet dependency D:\websites\phphub5\node_modules\minimatch,
npm WARN unmet dependency which is version 3.0.2
npm WARN unmet dependency D:\websites\phphub5\node_modules\laravel-elixir\node_modules\gulp-phpspec\node_modules\jshint requires lodash@'3.7.x' but will load
npm WARN unmet dependency D:\websites\phphub5\node_modules\laravel-elixir\node_modules\gulp-phpspec\node_modules\lodash,
npm WARN unmet dependency which is version 3.10.1
npm WARN unmet dependency D:\websites\phphub5\node_modules\laravel-elixir\node_modules\gulp-phpspec\node_modules\gulp-jshint\node_modules\gulp-util requires through2@'^2.0.0' but will load
npm WARN unmet dependency D:\websites\phphub5\node_modules\laravel-elixir\node_modules\gulp-phpspec\node_modules\gulp-jshint\node_modules\through2,
npm WARN unmet dependency which is version 0.6.5
npm WARN unmet dependency D:\websites\phphub5\node_modules\laravel-elixir\node_modules\gulp-phpspec\node_modules\gulp-jshint\node_modules\rcloader requires lodash@'~2.4.1' but will load
npm WARN unmet dependency D:\websites\phphub5\node_modules\laravel-elixir\node_modules\gulp-phpspec\node_modules\lodash,
npm WARN unmet dependency which is version 3.10.1
npm WARN unmet dependency D:\websites\phphub5\node_modules\laravel-elixir\node_modules\gulp-phpspec\node_modules\gulp-util\node_modules\chalk requires supports-color@'^0.2.0' but will load
npm WARN unmet dependency D:\websites\phphub5\node_modules\supports-color,
npm WARN unmet dependency which is version 3.1.2
npm WARN unmet dependency D:\websites\phphub5\node_modules\laravel-elixir\node_modules\gulp-phpspec\node_modules\gulp-todo\node_modules\gulp-util requires through2@'^2.0.0' but will load
npm WARN unmet dependency D:\websites\phphub5\node_modules\laravel-elixir\node_modules\gulp-phpspec\node_modules\gulp-todo\node_modules\through2,
npm WARN unmet dependency which is version 0.6.5
npm WARN unmet dependency D:\websites\phphub5\node_modules\laravel-elixir\node_modules\gulp-phpunit\node_modules\gulp-messenger\node_modules\gulp-debug\node_modules\gulp-util requires object-assign@'^3.0.0' but will load
npm WARN unmet dependency D:\websites\phphub5\node_modules\laravel-elixir\node_modules\gulp-phpunit\node_modules\gulp-messenger\node_modules\gulp-debug\node_modules\object-assign,
npm WARN unmet dependency which is version 4.1.0
npm WARN unmet dependency D:\websites\phphub5\node_modules\laravel-elixir\node_modules\gulp-phpunit\node_modules\gulp-util\node_modules\chalk requires supports-color@'^0.2.0' but will load
npm WARN unmet dependency D:\websites\phphub5\node_modules\supports-color,
npm WARN unmet dependency which is version 3.1.2
npm WARN unmet dependency D:\websites\phphub5\node_modules\laravel-elixir\node_modules\gulp-sass\node_modules\node-sass requires glob@'^7.0.3' but will load
npm WARN unmet dependency D:\websites\phphub5\node_modules\laravel-elixir\node_modules\glob,
npm WARN unmet dependency which is version 5.0.15
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "D:\Program Files\nodejs\node.exe" "D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "--no-bin-links"
npm ERR! node v4.4.7
npm ERR! npm v2.15.8
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants laravel-elixir@^5.0

npm ERR! Please include the following file with any support request:
npm ERR! D:\websites\phphub5\npm-debug.log

Composer install failed

➜  phphub5 git:(master) ✗ composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 42 installs, 5 updates, 0 removals
  - Installing summerblue/turbo (0.3.2) Downloading: Failed    Failed to download summerblue/turbo from dist: The "https://api.github.com/repos/summerblue/Turbo/zipball/e521ca5b52cc1164f656db51472563cbf2b87d18" file could not be downloaded (HTTP/1.1 404 Not Found)
    Now trying to download from source
  - Installing summerblue/turbo (0.3.2) Cloning e521ca5b52


  [RuntimeException]
  Failed to clone https://github.com/summerblue/Turbo.git via https, ssh protocols, aborting.
  - https://github.com/summerblue/Turbo.git
    Cloning into '/Users/xieweizhi/Documents/Money/phphub5/vendor/summerblue/turbo'...
    remote: Invalid username or password.
    fatal: Authentication failed for 'https://github.com/summerblue/Turbo.git/'
  - [email protected]:summerblue/Turbo.git
    Cloning into '/Users/xieweizhi/Documents/Money/phphub5/vendor/summerblue/turbo'...
    ERROR: Repository not found.
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.

请问如何解决呢?

建议修改mysql默认字符集,不然执行迁移会出错

文件路径config/database.php,修改mysql配置

'mysql' => [
            'driver'    => 'mysql',
            'host'      => env('DB_HOST', 'localhost'),
            'database'  => env('DB_DATABASE', 'forge'),
            'username'  => env('DB_USERNAME', 'forge'),
            'password'  => env('DB_PASSWORD', ''),
            'charset'   => 'utf8', // changed
            'collation' => 'utf8_unicode_ci', // changed
            'prefix'    => '',
            'strict'    => false,
        ],
`

button按钮的一个BUG

注意到作者@summerblue在最近10天内更新了部分文件

在本地测试时发现后台管理用户按钮失效的BUG,如图(点击按钮无效)

1

安装完成后,打开网址,显示网站无法正常运作

查看 hhvm 日志,提示:
Fatal error: more than one trait contains method 'restore' in /home/vagrant/Code/laravel/public/phphub5/app/Models/User.php on line 17.

应该是 restore 方法重复定义了...

新手不知道怎么修改,请指教

项目安装成功,后台管理登陆访问不过去了

前台phphub5.app正常;但是访问phphub5.app/admin 不行了!

跳转链接:http://phphub.app/login?error=redirect_uri_mismatch&error_description=The+redirect_uri+MUST+match+the+registered+callback+URL+for+this+application.&error_uri=https%3A%2F%2Fdeveloper.github.com%2Fv3%2Foauth%2F%23redirect-uri-mismatch&state=Yh2tHZcB03ZEdLB7sou3LPVRkw7FyHVl0F49WI4i

Specified key was too long; max key length is 1000 bytes

安装的时候提示:

[Illuminate\Database\QueryException]
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (S
QL: alter table revisions add index revisions_revisionable_id_revisionable_type_index(revisionable_id, revis ionable_type))

[PDOException]
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes

看说明是索引组合后最大长度超限制了,不知道大家是怎么解决的。我用的MYSQL

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.