borwita-packages/php-minio-service
Laravel/PHP helper for working with MinIO object storage. Provides a service wrapper to configure MinIO/S3-compatible connections and simplify common operations like uploads, downloads, and file management within your application.
Strengths:
StorageEvents), enabling seamless integration with existing Laravel workflows (e.g., file upload handlers, queue jobs).config system, allowing multi-environment setups (dev/stage/prod).FileStored, FileDeleted), enabling reactive workflows (e.g., notifications, analytics).Fit Gaps:
High:
Minio\Client) with Laravel-friendly facades/services (e.g., MinioService::upload()).config/filesystems.php or a dedicated config file, reducing merge conflicts.Storage::disk('minio')->put()).$request->file('avatar')->store('avatars')).Challenges:
Cache::remember) for performance-critical paths (e.g., listing objects).Low-Medium:
Mitigation:
throw_if).Log facade)? Is there support for structured logging?.env, AWS-like secrets manager)?env() or vault integration)?Ideal For:
Storage facade, filesystem config).Less Ideal For:
Assessment Phase:
Proof of Concept (PoC):
Incremental Rollout:
new Minio\Client() with MinioService::client().config/filesystems.php.FileStored) for reactive workflows.Deprecation:
Laravel:
spatie/laravel-medialibrary, intervention/image).PHP:
php.ini settings if needed (e.g., max_execution_time).MinIO Server:
Dependencies:
aws/aws-sdk-php).composer why-not to check for version constraints.Pre-Integration:
minio/minio:latest).'disks' => [
'minio' => [
'driver' => 'minio',
'key' => env('MINIO_KEY'),
'secret' => env('MINIO_SECRET'),
'endpoint' => env('MINIO_ENDPOINT'),
'bucket' => env('MINIO_BUCKET'),
'region' => env('MINIO_REGION', 'us-east-1'),
'use_path_style_endpoint' => env('MINIO_USE_PATH_STYLE', false),
],
],
Core Integration:
Storage::disk('s3')->put() with Storage::disk('minio')->put().MinioService.Advanced Features:
FileStored).MinioService):
$service->extend(function ($app) {
return new CustomMinioService($app->make('minio'));
});
Testing:
How can I help you explore Laravel packages today?