Download the PHP package jmluang/weapp without Composer

On this page you can find all versions of the php package jmluang/weapp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package weapp

laravel-weapp

A weapp login logic Laravel warpper

本仓库从 wafer2开发套件 中提取并封装了微信小程序的登陆逻辑并转移到Laravel中,不仅降低开发者的学习成本,而且能快速完成小程序的登陆功能 甚至连数据库都不需要担心,因为插件已经包装好数据库的操作了。您只需要导入相关的到数据库中即可。 若需要使用自己的数据库和用户的逻辑操作,只需要继承相应的接口和提供 Facade 类就可以了。详情可以查看使用自己的数据库和逻辑

特点

注意

安装

只需要五步即可完成安装部署。

  1. 通过 composer 安装: composer require jmluang/weapp:2.*

  2. 添加 Provider 到config/app.php

  3. 发布配置文件

参数如下:

参数 说明
appid 你的 AppID 必须
secret 你的 AppSecret 必须
code2session_url 默认url 不用改变
WxLoginExpires 7200(秒) 选填,填写前先取消备注
NetworkTimeout 3000(毫秒) 选填,填写前先取消备注

配置参数有两种方法,一种是直接写到weapp.php文件中,另一种是写到.env文件中,使用哪种方法都可以。但是有一点需要注意,若你的项目会发布到开源社区,则不推荐使用第一种方法,因为这样做存在泄露信息的风险。

WxLoginExpiresNetworkTimeout 都使用了默认的参数,如果你有特殊的需求需要改这两个参数,只要取消备注并填写即可。

  1. 添加数据库 Facade 到config/app.php

若重写了数据库逻辑,则这里应该使用你自己的 Facade 类:

  1. 迁移数据库

若重写了数据库逻辑,则可以忽略这一步

使用方法

  1. Laravel 配置 安装完成后,下面创建一个控制器和路由规则 路由文件:

控制器:

  1. 微信小程序中 首先在小程序中引入 js-skd,然后就可以写相关的逻辑了

使用自己的数据库和逻辑

要使用自己的数据库逻辑,只需要简单的三步操作

  1. 继承接口类jmluang\weapp\WeappUserInterface 并实现storeUserInfofindUserBySKey方法
  2. 创建Facade类
  3. config\app.phpaliases数组中使用您的Facade类覆盖jmluang\weapp\Facades\WeappUser::class

Done!


若本仓库对您有所帮助,欢迎Start

若发现问题或需要帮助,欢迎提交Issue

感谢!

LICENSE

MIT

Written with StackEdit.


All versions of weapp with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jmluang/weapp contains the following files

Loading the files please wait ....