PHP code example of webman-tech / laravel-http

1. Go to this page and download the library: Download webman-tech/laravel-http library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

webman-tech / laravel-http example snippets


use WebmanTech\LaravelHttp\Facades\LaravelUploadedFile;

// 包装 Webman 上传文件为 Laravel UploadedFile
$uploadedFile = LaravelUploadedFile::wrapper($request->file('avatar'));
// 现在可以使用 Laravel 的所有文件操作方法
$path = $uploadedFile->store('avatars');