Download the PHP package hihone/laravel5-ucenter without Composer

On this page you can find all versions of the php package hihone/laravel5-ucenter. 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 laravel5-ucenter

ucenter for Laravel 5

Laravel 5 / 5.1 ucenter.

安装

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

"hihone/laravel5-ucenter": "dev-master"

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

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

Hihone\Laravel5Ucenter\UcenterServiceProvider::class,

找到 aliases 键,

'Ucenter' => Hihone\Laravel5Ucenter\Facades\Ucenter::class,

配置

将以下配置保存到 根\config 的 ucenter.php中,或者直接从该项目的src/config中拷贝过去

ucenter配置项

//ucenter.php
'url'       => env('ucenter_url','/api/ucapi'), // 网站UCenter接受数据地址 注意路由配置
'api'       => env('ucenter_api','http://localhost/ucenter'), // UCenter 的 URL 地址, 在调用头像时依赖此常量
'connect'   => env('ucenter_connect','mysql'), // 连接 UCenter 的方式: mysql/NULL, 默认为空时为 fscoketopen()
'dbhost'    => env('ucenter_dbhost','localhost'), // UCenter 数据库主机
'dbuser'    => env('ucenter_dbuser','root'), // UCenter 数据库用户名
'dbpw'      => env('ucenter_dbpw','root'), // UCenter 数据库密码
'dbname'    => env('ucenter_dbname','ucenter'), // UCenter 数据库名称
'dbcharset' => env('ucenter_dbcharset','utf8'),// UCenter 数据库字符集
'dbtablepre'=> env('ucenter_dbtablepre','uc_'), // UCenter 数据库表前缀
'key'       => env('ucenter_key','6bc3bbKaoWnVrb26juVvk4uq4c2a5SNQvzv70Zs'), // 与 UCenter 的通信密钥, 要与 UCenter 保持一致
'charset'   => env('ucenter_charset','utf-8'), // UCenter 的字符集
'ip'        => env('ucenter_ip','127.0.0.1'), // UCenter 的 IP, 当 UC_CONNECT 为非 mysql 方式时, 并且当前应用服务器解析域名有问题时, 请设置此值
'appid'     => env('ucenter_appid',5), //当前应用的 ID
'ppp'       => env('ucenter_ppp',20), //当前应用的每页数量

路由配置 将该项目中的src/routes.php中的路由定义配置到对应自己项目中的routes.php文件中

使用

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

1、使用execute
$result = Ucenter::execute('uc_get_user',['admin']);
var_dump($result);

感谢

fork自 https://github.com/goodspb/laravel5-ucenter 更改以适应 laravel 5以上


All versions of laravel5-ucenter with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
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 hihone/laravel5-ucenter contains the following files

Loading the files please wait ....