yedincisenol / vision
Laravel wrapper for GCloud Vision PHP client
Installs: 3 542
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- google/cloud-vision: ^0.15.2
This package is auto-updated.
Last update: 2024-11-19 07:30:55 UTC
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