Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Flysystem Bundle Laravel Package

league/flysystem-bundle

View on GitHub
Deep Wiki
Context7

MongoDB GridFS

GridFS stores files in a MongoDB database.

Install the GridFS adapter:

composer require league/flysystem-gridfs

With doctrine/mongodb-odm-bundle

For applications that uses Doctrine MongoDB ODM, set the doctrine_connection name to use:

# config/packages/flysystem.yaml

flysystem:
    storages:
        users.storage:
            gridfs:
                # Name of a Doctrine MongoDB ODM connection
                doctrine_connection: 'default'
                # Use the default DB from the Doctrine MongoDB ODM configuration
                database: ~
                bucket: 'fs'

With a Full Configuration

To initialize the GridFS bucket from configuration, set the mongodb_uri and database options, others are optional.

# config/packages/flysystem.yaml

flysystem:
    storages:
        users.storage:
            gridfs:
                # MongoDB client configuration
                mongodb_uri: '%env(MONGODB_URI)%'
                mongodb_uri_options: []
                mongodb_driver_options: []
                # Database name is required
                database: '%env(MONGODB_DB)%'
                bucket: 'fs'
# .env

MONGODB_URI=mongodb://127.0.0.1:27017/
MONGODB_DB=flysystem

With a Bucket Service

For a more advanced configuration, create a service for MongoDB\GridFS\Bucket:

# config/packages/flysystem.yaml

services:
    mongodb_client:
        class: 'MongoDB\Client'
        arguments: ['%env(MONGODB_URI)%']

    mongodb_database:
        class: 'MongoDB\Database'
        factory: ['[@mongodb_client](https://github.com/mongodb_client)', 'selectDatabase']
        arguments: ['%env(MONGODB_DB)%']

    mongodb_gridfs_bucket:
        class: 'MongoDB\GridFS\Bucket'
        factory: ['[@mongodb_database](https://github.com/mongodb_database)', 'selectGridFSBucket']

flysystem:
    storages:
        users.storage:
            gridfs:
                # Service name
                bucket: 'mongodb_gridfs_bucket'
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui