Giter VIP home page Giter VIP logo

ucenter's Introduction

Ucenter Service Provider For Laravel5

###注意!! 这个库并没有发布正式版本,所有的api都有可能在开发版本中变动。请等待最近的正式版本和文档,谢谢您的关注!

Ucenter Service Provider For Laravel5

Latest Stable Version Total Downloads Latest Unstable Version License

Build Status

安装

只要在你的 composer.json 文件require中加入下面内容,就能获得最新版.

"binaryoung/ucenter": "dev-master"

然后需要运行 "composer update" 来更新你的项目

安装完后,在 app/config/app.php 文件中找到 providers 键,

'providers' => array(

    'Binaryoung\Ucenter\UcenterServiceProvider'

)

找到 aliases 键,

'aliases' => array(

    'Ucenter' => 'Binaryoung\Ucenter\Facades\Ucenter'

)

配置

运行以下命令发布配置文件

php artisan vendor:publish

ucenter配置项

//config.php
'url'		=> '', // 网站UCenter接受数据地址
'api'		=> 'http://localhost/ucenter', // UCenter 的 URL 地址, 在调用头像时依赖此常量
'connect'	=> 'mysql', // 连接 UCenter 的方式: mysql/NULL, 默认为空时为 fscoketopen()
'dbhost'	=> 'localhost', // UCenter 数据库主机
'dbuser'	=> 'root', // UCenter 数据库用户名
'dbpw'		=> 'root', // UCenter 数据库密码
'dbname'	=> 'ucenter', // UCenter 数据库名称
'dbcharset'	=> 'utf8',// UCenter 数据库字符集
'dbtablepre'=> '`uc`.uc_', // UCenter 数据库表前缀
'key'		=> '666cLXgFsrl6TcvDflhrvdcziY8SnhP1eexl1eQ', // 与 UCenter 的通信密钥, 要与 UCenter 保持一致
'charset'	=> 'utf-8', // UCenter 的字符集
'ip'		=> '127.0.0.1', // UCenter 的 IP, 当 UC_CONNECT 为非 mysql 方式时, 并且当前应用服务器解析域名有问题时, 请设置此值
'appid'		=> 1, //当前应用的 ID
'ppp'		=> 20, //当前应用的 ID

使用

例如:获取用户名为test的信息

$result = Ucenter::uc_get_user('test');
var_dump($result);

联系我

有问题,请提交issue

ucenter's People

Contributors

binaryoung avatar kinosang avatar

Watchers

 avatar  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.