Download the PHP package hughcube/laravel-alioss without Composer
On this page you can find all versions of the php package hughcube/laravel-alioss. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-alioss
Laravel AliOSS
Alibaba Cloud OSS adapter for Laravel, based on alibabacloud/oss-v2.
Requirements
- PHP >= 8.0
- Laravel 9+
Installation
ServiceProvider auto-discovery is enabled. No manual registration needed.
Configuration
Add a disk to config/filesystems.php:
Quick Start
Flysystem Operations
Standard FilesystemAdapter interface:
Extended operations:
URL Operations
All URL methods return OssUrl instances (extends HUrl, supports __toString).
Build URLs
Signed URLs
Domain Detection
Domain Conversion
Parse URL
OssUrl
OssUrl extends HUrl with OSS-specific capabilities. All methods are immutable (return new instances).
Domain Operations
Signing
Process parameters are included in the signature automatically:
Image Processing
Operations chain automatically. image/ prefix appears only once in the output.
| Method | Description |
|---|---|
imageResize($w, $h, $mode) |
Scale. Modes: lfit, mfit, fill, pad, fixed |
imageResizeByPercent($pct) |
Scale by percentage [1, 1000] |
imageCrop($w, $h, $gravity, $x, $y) |
Crop. Gravity: nw, north, ne, west, center, east, sw, south, se |
imageRotate($angle) |
Rotate [0, 360] |
imageFlip($dir) |
Flip: h, v, both |
imageFormat($fmt) |
Convert: jpg, png, webp, bmp, gif, tiff, heic, avif |
imageQuality($q, $abs) |
Quality [1, 100]. $abs=true for absolute |
imageBlur($r, $s) |
Blur. radius/sigma [1, 50] |
imageBright($val) |
Brightness [-100, 100] |
imageContrast($val) |
Contrast [-100, 100] |
imageSharpen($val) |
Sharpen [50, 399] |
imageCircle($r) |
Circle crop, radius [1, 4096] |
imageRoundedCorners($r) |
Rounded corners [1, 4096] |
imageAutoOrient() |
Auto-rotate by EXIF |
imageInterlace() |
Progressive display (JPG only) |
imageIndexCrop($size, $idx, $axis) |
Indexed slice |
imageWatermarkText($text, ...) |
Text watermark |
imageWatermarkImage($path, ...) |
Image watermark |
imageInfo() |
Image metadata (JSON) |
imageAverageHue() |
Dominant color |
Remove operations: imageRemoveResize(), imageRemoveRotate(), imageRemoveWatermark(), etc.
Video Processing
Audio Processing
Document Processing
Generic Process
Validation Rule
OssFile validates that a URL points to a valid OSS file.
Constraints
Domain: cdnDomain(), uploadDomain(), ossDomain(), anyDomain()
File type: image(), video(), audio(), media(), document(), pdf(), word(), excel(), ppt(), archive(), text(), json(), xml(), mimeTypes([...])
Size: minSize($bytes), maxSize($bytes), sizeBetween($min, $max)
Image dimensions: maxWidth($px), maxHeight($px), aspectRatio($w, $h), minAspectRatio($w, $h), maxAspectRatio($w, $h)
Path: extensions([...]), exceptExtensions([...]), directory($dir), directories([...]), exceptDirectory($dir), filenameMaxLength($len)
Behavior: domainOnly(), checkExists(false)
Query After Validation
License
MIT
All versions of laravel-alioss with dependencies
illuminate/filesystem Version *
league/flysystem Version *
alibabacloud/oss-v2 Version ^0.4
hughcube/purl Version *
hughcube/guzzle-http Version *