adexaja / imgurx
Imgurx是一个基于Adyg/php-imgur-api-client的laravel包,用于访问Imgur网络服务
1.0.2
2016-01-23 16:10 UTC
Requires
- php: >=5.4.0
- adyg/php-imgur-api-client: ^1.0
Requires (Dev)
- phpunit/phpunit: 4.1.*
This package is not auto-updated.
Last update: 2024-09-18 20:42:12 UTC
README
Imgurx是一个基于Imgur的laravel 5包,基于nahid/imgurx
安装
您可以通过composer安装它。打开您的终端,然后在您的项目中运行此命令
composer require nahid/imgurx
请稍等片刻。安装完成后,您需要在app.php
中定义您的提供者。打开`config/app.php',并在providers键中添加此代码
Nahid\Imgurx\ImgurxServiceProvider::class,
如果您想使用laravel facade,请在aliases键中添加此行
'Imgurx' => Nahid\Imgurx\Facades\Imgurx::class,
好的,您的laravel集成已完成。现在再次打开您的终端,然后从您的项目中运行此代码
php artisan vendor:publish
现在将imgurx.php
配置文件复制到config
目录。
配置
如果您成功完成了安装过程,那么现在请打开config/imgurx.php
文件并输入您的应用程序凭据。
return [ 'client_id' => '', 'client_secret'=> '', ];
太棒了。您已成功完成Imgurx配置过程:)
用法
Imgurx继承自Adyg/php-imgur-api-client,因此您可以自由使用此包的所有功能。请参阅其文档部分。
编码愉快:)