Laravel Google Cloud Vision API package
composer require giulioprinaricotti/laravel-gcv
Add the following lines to your config/app.php
'providers' => [
...
LaravelGCV\LaravelGCVProvider::class,
...
],
'aliases' => [
...
'LaravelGCV' => LaravelGCV\LaravelGCVFacade::class,
],
use LaravelGCV\LaravelGCVFacade;
use Illuminate\Support\Facades\Storage;
class TestController extends Controller
{
public function test(){
$result = LaravelGCVFacade::colors(Storage::disk('local')->get('clc.jpg')));
return response()->json(compact('result'));
}
}