Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to use Vientiane YouTu on Laravel

Shulou Source: shulou.com Published: 2022-05-31 16:24:32 10月05日 Update

This article mainly introduces how to use Vientiane YouTu on Laravel, the article is very detailed, has a certain reference value, interested friends must read it!

How to use Vientiane YouTu on Laravel? Installation

Execute the composer command to install the extension

Composer require yuecode/image

Add to Provider in config/app.php

\ Yuecode\ Image\ ImageProvider::class

Executing php artisan vendor:publish will automatically generate the image.php file in the config/ directory and modify the corresponding options in the configuration file.

After the configuration is complete, use the

Use Yuecode\ Image\ YouTu

Then use static method calls

such as

$res = YouTu::pornDetectUrl (array ("https://cache.yisu.com/upload/information/20210522/355/681909.jpg"," https://cache.yisu.com/upload/information/20210522/355/681910.jpg")); dd ($res) Method list method Note uploadImage upload picture, Vientiane YouTu V2 interface statImage query picture information, Vientiane YouTu V2 interface copyImage copy picture, Vientiane YouTu V2 interface delImage delete picture, Vientiane YouTu V2 interface uploadImageV1 upload picture, Vientiane YouTu V1 interface statImageV1 query picture information, Vientiane YouTu V1 interface copyImageV1 copy picture, Vientiane YouTu V1 interface delImageV1 delete picture Vientiane YouTu V1 interface uploadVideo uploads video statVideo to view video status delVideo deletes video file pornDetect intelligent porn detection, parameter is URLpornDetectUrl multi-image intelligent porn detection, parameter is URL arraypornDetectFile image file can only detect porn, parameter is file array sample code

Upload pictures

$res = YouTu::uploadImage ($request- > file ('x')-> getRealPath ()); dd ($res)

Intelligent porn detection

$res = YouTu::pornDetect ('http://img.taopic.com/uploads/allimg/130716/318769-130G60P30462.jpg')dd($res) above is all the contents of the article "how to use Vientiane YouTu on Laravel". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Vientiane pictures interfaces files parameters methods intelligence video information content articles queries configurations code values interests commands comments guys buddies Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Linux Shulou Technology vpn Shulou Tech Info