shineability/laravel-azure-blob-storage
A Laravel filesystem driver that connects your application to Azure Blob Storage, letting you read, write, and manage blobs and containers through Laravel's familiar Storage facade and Flysystem integration. Configure an account and use it like any other disk.
composer require <this-package> then composer show azure-oss/storage-blob-flysystem — 1.3.0 requires ^2.0, so a stale composer.lock pinned to 1.x is the first thing to check.config/filesystems.php with 'driver' => 'azure', plus container name and credentials (connection string, account key, or SAS token) sourced from .env. Never inline keys; keep them in config and reference via env() only inside config files.Storage::disk('azure')->putFileAs('invoices', $request->file('invoice'), "{$invoice->id}.pdf");
$url = Storage::disk('azure')->temporaryUrl("invoices/{$invoice->id}.pdf", now()->addMinutes(15));
azure-oss upgrade guide linked in the release notes — the package API is unchanged in 1.3.0, but the adapter underneath is not.Storage::fake('azure') test for the upload path before wiring anything into production code.azure, azure-public, azure-archive) rather than passing container names at call sites; keeps credentials and visibility policy in one place and makes Storage::fake() swaps trivial.temporaryUrl() over public containers for anything user-generated. 1.3.0 fixes percent-encoding of the SAS expiry timestamp, so URLs now generate correctly for all expiry values; this is the supported path for private blobs.put()/writeStream() and Storage::disk('azure')->readStream() rather than get() into memory. Azure blobs can be multi-GB; the Flysystem adapter handles chunked uploads for you.DocumentStorage) that exposes store(), url(), delete(). This is your seam for swapping disks in tests and for the upcoming adapter upgrade./ as a virtual directory but rejects/normalises some characters.Storage::fake() for logic, and keep one integration test (marked or gated by env) that hits a real container, since SAS signing behaviour cannot be faked.composer update --with-dependencies and then composer why azure-oss/storage-blob-flysystem to confirm a single 2.x version is resolved.azure-oss/storage-blob-flysystem ^2.0 depends on an azure-oss/storage* 2.x line that removed exception classes. If your app composer requires any azure-oss/storage* package directly, or your catch blocks reference its old exception classes, they will silently stop matching. Grep for Azure\\Storage\\ in app/ and tests/ before deploying.League\Flysystem\UnableToReadFile / UnableToWriteFile / FilesystemException interfaces over adapter-specific exceptions — they survive this kind of dependency bump and are what the Laravel Storage facade surfaces.temporaryUrl() string, or any client/partner that pre-computes or regex-validates signed URLs, needs re-checking. Assert on host/container/path and se= presence instead of full-string equality.temporaryUrl() links fail immediately in local dev, check the container/app clock and keep expiry margins generous (≥5 minutes).temporaryUrl() requires a credential that can sign. A connection string or account key works; a read-only SAS token pasted into config generally cannot mint new SAS URLs — use a stored SAS with sufficient expiry, or a managed identity/account key.'visibility' => 'public' in the disk config will not make a private container public; don't rely on it as an access-control switch.ContainerNotFound at first write, not at boot.config('filesystems.disks.azure') → Storage::disk('azure')->allFiles() (a minimal list call isolates auth from write issues) → adapter version via composer show → Azure storage logs.Storage::extend() for a driver that adds prefixing/retry logic. Keep such customisations thin — 1.3.0 shows the adapter layer is where churn happens.How can I help you explore Laravel packages today?