- What does overtrue/laravel-filesystem-qiniu actually do?
- It registers a Qiniu Kodo driver with Laravel's Filesystem component so Qiniu object storage behaves like any other disk in your application. You add a disk entry in config/filesystems.php and then call Storage::disk('qiniu') using the familiar put, get, delete, exists, and url methods. It is built on the official Qiniu PHP SDK, which means you get Qiniu-backed uploads without writing Qiniu-specific code in your app layer.
- Which Laravel versions does laravel-filesystem-qiniu support?
- Version 3.0.0 supports Laravel 13 only, since the maintainer deliberately narrowed the compatibility matrix to a single framework major. If your application is on Laravel 12 or earlier, v3 is not installable and you would need to remain on the 2.x line while you plan a framework upgrade. Always confirm the exact constraint in the package composer.json before adding it to your dependency graph, and check whether 2.x still receives patches if you defer.
- How do I install overtrue/laravel-filesystem-qiniu?
- Run composer require overtrue/laravel-filesystem-qiniu and let Composer resolve the version against your Laravel constraint. Laravel package auto-discovery should register the service provider, but verify that on your framework version and add it manually to the providers array in config/app.php if it is not picked up. After installation, add a qiniu disk to config/filesystems.php and reference it explicitly or set it as your default disk.
- How do I configure the Qiniu disk in config/filesystems.php?
- Add an entry under the disks array with the driver set to qiniu, then supply your Qiniu access key, secret key, bucket name, and the domain used for public URLs. Keep credentials in .env and read them through env() calls in the config file rather than committing secrets. The exact option keys come from the package's own config, so publish or read that file first and match the names precisely.
- Can I serve Qiniu files from a custom domain or CDN?
- Yes, the package supports custom domains and CDN hostnames when generating public file URLs. Set the domain option on the disk to the domain already bound to your Qiniu bucket, and Storage::disk('qiniu')->url($path) will build links on that host instead of a default Qiniu domain. Make sure the domain is configured and validated in the Qiniu console first, otherwise the generated URLs will not resolve.
- Does this package support private buckets and signed or temporary URLs?
- The documented feature set focuses on public file URLs built from a configured domain. Signed, expiring, or private-bucket download URLs are not described in the package overview, so verify support in the source or tests before depending on it. If the driver does not expose them, generate private download links with the official Qiniu PHP SDK alongside the disk rather than forking the adapter.
- What PHP version does laravel-filesystem-qiniu 3.0 require?
- A Laravel 13-only release almost certainly raises the minimum PHP version, but you should confirm the exact floor in the require block of the package composer.json. That matters because a PHP bump is a host-level change affecting base images, CI runners, and any extensions pinned to an older runtime. Run composer why-not overtrue/laravel-filesystem-qiniu to see precisely what blocks installation in your tree.
- How do I test code that uploads to the Qiniu disk?
- Laravel's Storage::fake() covers disks the framework can fake locally, but it does not give you a Qiniu backend, so keep Qiniu uploads behind a small abstraction you can swap in tests. Alternatively mock the HTTP layer or the Qiniu SDK client so the default test suite never touches the network. Any integration test against a real bucket should be credential-gated and run separately from normal CI.
- Is overtrue/laravel-filesystem-qiniu safe to use in production?
- Version 3.0.0 primarily narrows the compatibility matrix, which is legitimate semver but leaves the release new and the least proven. Reports that continuous integration was added only in this release mean the reliability of the older 2.x code is unknown rather than assumed good. If you adopt it, pin the version, review the changelog and tagged diff, and confirm whether 2.x still receives security patches while you plan a Laravel 13 upgrade.
- What are the alternatives to this package for Qiniu storage in Laravel?
- You can call the official Qiniu PHP SDK directly and wrap it in a small service class, which removes a dependency but adds code your team owns and maintains. Other community packages such as zgldh/qiniu-laravel-storage provide similar Flysystem-based Qiniu disks and may still support older Laravel majors. S3-compatible adapters are only a substitute if your storage provider speaks S3, which Qiniu Kodo does not replace outright.