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

Bundles Cms Laravel Package

kunstmaan/bundles-cms

Kunstmaan CMS is a full-featured, multilingual CMS built on the Symfony full-stack framework. It offers page and form assembly, versioning, workflow, translation tools, and media management, plus integrations with community bundles.

View on GitHub
Deep Wiki
Context7

Using a custom filesystem for the MediaBundle

The MediaBundle uses the KnpGaufretteBundle to interact with the filesystem. By default it uses a local filesystem. However, you can override the default adapter to have it use any filesystem supported by Gaufrette.

Example S3 configuration

S3 client

Create a S3 client for the adapter to work with.

s3:
    class: Aws\S3\S3Client
    arguments:
        options:
            version: latest
            region: "%s3.region%"
            credentials:
                key: "%s3.key%"
                secret: "%s3.secret%"

S3 filesystem adapter

Override the default filesystem adapter service used by the MediaBundle.

kunstmaan_media.filesystem_adapter:
    class: Gaufrette\Adapter\AwsS3
    arguments:
        - "[@s3](https://github.com/s3)"
        - "%s3.uploads_bucket%"
        - []
        - true # detect file content-type

Override the media path so files are stored in the buckets root.

parameters:
    kunstmaan_media.media_path: ""

LiipImagine

Have the LiipImagine bundle stores its cache on S3.

liip_imagine.cache.resolver.s3:
    class: Liip\ImagineBundle\Imagine\Cache\Resolver\AwsS3Resolver
    arguments:
        - "[@s3](https://github.com/s3)"
        - "%s3.cache_bucket%"
        - null
    tags:
        - { name: 'liip_imagine.cache.resolver', resolver: 's3' }

Use the CacheResolver and load data from S3.

liip_imagine:
    loaders:
        remote:
            stream:
                wrapper: "%s3.url%"
    data_loader: remote
    cache: s3

Parameters

s3.region: eu-west-1
s3.uploads_bucket: xxx
s3.cache_bucket: xxx
s3.key: "xxx"
s3.secret: "xxx"
s3.url: "https://s3-%s3.region%.amazonaws.com/%s3.uploads_bucket%/"

Note on paths

This sample configuration overrules the kunstmaan_media.media_path parameter to any empty string. This is so that files are stored in the buckets root, but also causes the urls on Media entity in the database to be relative to the bucket. Any images that use an imagine_filter will properly work because it will load all images from the bucket using the s3.url parameter. However, if you want to directly link to files or images, you will have to prepend their url with the path to S3.

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.
directorytree/privacy-filter-classifier
directorytree/privacy-filter
babenkoivan/elastic-client
innmind/static-analysis
innmind/coding-standard
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit