jerodev/flysystem-v3-smb-adapter

SMB adapter for Flysystem v3
110,239 14
Install
composer require jerodev/flysystem-v3-smb-adapter
Latest Version:1.2.1
PHP:>=8.0.2
License:MIT
Last Updated:Mar 24, 2026
Links: GitHub  ·  Packagist
Maintainer: jerodev

SMB adapter for Flysystem v3

run-tests Latest Stable Version

This package enables you to communicate with SMB shares through Flysystem v3.

Installation

composer require jerodev/flysystem-v3-smb-adapter

Usage

The adapter uses the Icewind SMB package to communicate with the share.
To use the flysystem adapter, you have to pass it an instance of \Icewind\SMB\IShare. Below is an example of how to create a share instance using the factory provided by Icewind SMB.

$server = (new \Icewind\SMB\ServerFactory())->createServer(
    $config->host,
    new \Icewind\SMB\BasicAuth(
        $config->user,
        'test',
        $config->password
    )
);
$share = $server->getShare($config->share);

return new \Jerodev\Flysystem\Smb\SmbAdapter($share, '');

Laravel Filesystem

The package also ships with a Laravel service provider that automatically registers a driver for you. Laravel will discover this provider for you when installing this package. All you have to do is configure the share in your config/filesystems.php similar to the example below.

'disks' => [
    'smb_share' => [
        'driver' => 'smb',
        'workgroup' => 'WORKGROUP',
        'host' => \env('SMB_HOST', '127.0.0.1'),
        'path' => \env('SMB_PATH', 'test'),
        'username' => \env('SMB_USERNAME', ''),
        'password' => \env('SMB_PASSWORD', ''),
        
        // Optional Icewind SMB options
        'smb_version_min' => \Icewind\SMB\IOptions::PROTOCOL_SMB2,
        'smb_version_max' => \Icewind\SMB\IOptions::PROTOCOL_SMB2_24,
        'timeout' => 20,
    ],
],

Related Packages

jungehaie/laravel-filesystem-google-cloud-storage

A Laravel Flysystem implementation for the Google Cloud Storage via a S3Client.

1,874 2
hpolthof/laravel-backblaze

Backblaze B2 Cloud Storage for Laravel 5

20,346 12
skydiver/laravel-flysystem-b2

Adds Backblaze B2 driver to use with Laravel filesystem

5,076 8
saeedvir/laravel-gist-storage

Laravel Storage driver for GitHub Gist - Store files on GitHub Gist using Larave...

6 0