Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to install micro-video SDK in Laravel

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

This article will explain in detail how to install micro-video SDK in Laravel. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

How to install micro-video SDK?

This adaptor plug-in is an extension developed for Laravel and will provide support for the entire PHP in the future.

To install microvideo SDK, you only need to execute the following command in the root directory of your Laravel project

Composer require yuecode/uvs

After the execution is successful, open your Laravel's config directory, open app.php, find providers, and add

\ YueCode\ Uvs\ UvsProvider::class

Save, exit.

Execute a command

Php artisan vendor:publish

Uvs.php is automatically generated in the config directory with several parameters that need to be configured for micro video.

Use the editor to open the uvs.php file and fill in the configuration items.

How to use micro-video

If you need to use the SDK of microvideo in a file, add it to the code

Use YueCode\ Uvs\ Uvs

Then use static methods to call the relevant methods, such as

The difference between Uvs::listFolder ('/') Uvs and Video objects

The extension encapsulates some functions.

When using it, you can choose to use

Use YueCode\ Uvs\ Uvs

Or

Use YueCode\ Uvs\ Video

The difference is that Uvs encapsulates the function. By default, the Bucket; Video defined in the uvs.php file is used as an official function, and you need to add bucketId as a parameter. Related documents can be seen: official documents

Available function

Upload: uploading video files

CreateFolder: create folder

ListFolder: directory list

PrefixSearch: prefix search

UpdateFolder: update catalog information

Update: updating file information

StatFolder: directory information query

Stat: file information query

DelFolder: deleting a directory

Del: deleting fil

This is the end of the article on "how to install micro-video SDK in Laravel". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Tags: Video file directory information function article Zhongan parameter command official document method more encapsulation update query configuration good practical successful Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Huawei Microsoft OPPO Reno Shulou Technology