yedincisenol/vision
最新稳定版本:0.1.2
Composer 安装命令:
composer require yedincisenol/vision
包简介
Laravel wrapper for GCloud Vision PHP client
README 文档
README
Laravel Install
- Add composer
composer require "yedincisenol/vision"
- Add service provider (For Laravel 5.6 before)
config/app.php
'providers' => [ ... yedincisenol\Vision\LaravelServiceProvider::class ],
- Add Facede
config/app.php
'aliases' => [ ... 'Vision' => \yedincisenol\Vision\LaravelFacede::class ],
- Fill Environments
copy theese parameters to your project .env and fill
VISION_CREDENTIALS_PATH=
VISION_API_KEY=
How to get credentials file? Visit here How to get API key? Visit here
- Laravel Usage
use Vision;
$image = Vision::image(file_get_contents('https://cdn.britannica.com/700x450/04/1304-004-E64E228C.jpg'), ['LABEL_DETECTION']);
$results = Vision::annotate($image);
collect(Vision::annotate($image)->labels())->each(function ($l) { echo $l->description() . PHP_EOL; });
For more detail visit here
- Publish Config file (Optional)
php artisan vendor:publish --tag=vision
统计信息
- 总下载量: 6.44k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-08-09