jkf8x8 / autoimg
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/jkf8x8/autoimg
Requires
- intervention/image: ^2.4
This package is auto-updated.
Last update: 2025-10-15 17:53:22 UTC
README
安装
composer require jkf8x8/autoimg
配置
config/app中
在$providers中添加 providers
Jkf8x8\Autoimg\AutoimgServiceProvider::class,
在$aliases数组中添加 facade
'Autoimg'=>Jkf8x8\Autoimg\Facades\Autoimg::class,
eg:
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Autoimg;
class Test extends Controller
{
public function index(){
//支持多图上传
//return array
// $file = $request->filename;
// return Autoimg::thumb($file);
//生成50*50头像
return Autoimg::thumb($file,[[50,50]]);
}
}