Giter Site home page Giter Site logo

salikx / laravel-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from purocean/laravel-template

0.0 2.0 0.0 1.26 MB

RESTful 模板,企业号/企业微信微信扫码登录/同步通讯录——Laravel vue2 iView

License: MIT License

PHP 71.81% Batchfile 0.07% Shell 1.47% JavaScript 12.80% HTML 1.62% Vue 12.20% CSS 0.03%

laravel-template's Introduction

Laravel 5.4 RESTful 应用模板,包含企业微信同步联系人,扫码登录,使用 Vue2 iView 做前端

composer.lock Latest Stable Version Total Downloads License

特性

  • 微信企业微信同步联系人
  • 扫码登录
  • Vue2 iView 前端界面
  • 文件上传处理
  • 微信 jssdk
  • RESTful

建议环境

  • PHP 7.0+
  • Composer
  • Redis
  • Mysql 5.7
  • MongoDB 3.2+

安装

composer install
cp .env.example .env
vim ./.env # 配置数据库,企业微信,缓存等信息
php ./artisan key:generate
php ./artisan jwt:secret
php ./artisan migrate # 迁移表结构
php ./artisan rbac:resetpwd suadmin <password> # 更改超级管理员密码
php ./artisan serve --host=192.168.1.108 # 运行开发服务器,IP 为本机局域网 IP,以便手机访问(扫码)
php ./artisan queue:work # 开启任务队列进程
composer run-script make-api-doc # 生成接口文档

cd frontend
npm install # 安装 nodejs 依赖
cp ./config/index.js.example ./config/index.js
vim ./config/index.js # 修改本机后台服务器 IP 端口
npm run dev # 运行开发服务器
npm run build # 前端打包
npm run dist # 把打包的文件复制到 public 目录
# npm run dist-win # 把打包的文件复制到 public 目录,windows 平台使用

测试

# 创建测试用 MySQL 数据库 laravel_template_test
cp ./phpunit.xml.example ./phpunit.xml # 编辑配置测试相关值
php ./artisan config:clear # 清除配置缓存
composer exec phpunit # 开始测试

注意事项

  • 若微信调试不通过,可在 /storage/app/qywx/qywx.log 查看日志,删除缓存文件
  • 请使用PHP7 以及开启 OPcache 提高性能
  • storage 及其目录需要有写入权限
  • 任务队列默认是 sync 方式,可在 .env 文件中修改为 redis 方式
  • 如非必要,队列不要用 root 权限执行
  • 线上修改了配置文件请需重新运行 php ./arartisan 更新配置缓存
  • 多项目使用同一个 redis 做任务队列支撑,需要配置好默认的任务队列

链接

截图

login_1 login_2 user

laravel-template's People

Contributors

purocean avatar

Watchers

James Cloos avatar  avatar

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.