Weave 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

Blogger Bundle Laravel Package

sylius/blogger-bundle

Adds a lightweight blog to Sylius: manage posts and categories in the admin, publish articles or news on your storefront, and pair content with your e-commerce site to keep customers informed and support SEO.

View on GitHub
Deep Wiki
Context7

Getting Started

Read this before you composer require anything. sylius/blogger-bundle is a Sylius/Symfony bundle, not a Laravel package. There is no service provider, no Eloquent model, no Blade view, no config/blogger.php. It is built on Sylius resource/grid abstractions and expects to run inside a Sylius 0.x/1.0-era application (Symfony 2.7/3.x, Doctrine ORM 2.4/2.5, PHP 5.5–7.x). The repository is archived and the description literally begins with DEPRECATED. — 13 stars, 0 dependents, no maintainer.

So the realistic getting-started paths are:

  1. You inherited a Sylius app that already depends on it. Read on — the steps below are for you.
  2. You are on Laravel and considering "can we use this?". You cannot, without rewriting it. Skip to Implementation Patterns → If you are actually on Laravel for the porting shape, but the short version is: reimplement the content model in Eloquent; you will inherit none of the original code.
  3. You are greenfield on Sylius. Do not adopt. Use a maintained page/content bundle or a headless CMS fronted by an API.

For the inherited-app case, minimal steps:

  1. composer require sylius/blogger-bundle — you will almost certainly fight Doctrine/Symfony constraints on anything newer than Symfony 3.4. Pin the resolved set in composer.lock and commit it.
  2. Register the bundle in app/AppKernel.php: new Sylius\Bundle\BloggerBundle\SyliusBloggerBundle(),.
  3. Import the routing under a prefix:
    # app/config/routing.yml
    sylius_blogger:
        resource: "@SyliusBloggerBundle/Resources/config/routing.yml"
        prefix: /blog
    
  4. Wire resources under sylius_blogger: in app/config/config.yml (model classes, form types, grid config — see below).
  5. app/console doctrine:schema:update --dump-sql and read the SQL. Never --force against a live DB; this bundle predates migration-based workflows in most of its downstream projects.
  6. Load the fixture (or create an article in the admin grid) and hit /blog.

Where to look first: DependencyInjection/Configuration.php and Resources/config/. Sylius bundles are config-driven first and PHP-driven second — the config tree is your extension surface. Then Resources/views/ to see what the default Twig templates actually query, and Resources/config/routing.yml for the route names you will be overriding.

First use case: a paginated article list at /blog and a slug-routed detail page at /blog/{slug}, linked from the storefront nav. Do not plan to grow this into a CMS — the entity surface is small (slug, title, content, publishing state) and archived code does not accrue features.

Implementation Patterns

Configure, do not subclass. The idiomatic Sylius pattern — and the way you would "leverage" this bundle day-to-day — is to point the bundle's resource config at your classes rather than editing vendor code:

# app/config/config.yml
sylius_blogger:
    resources:
        article:
            classes:
                model: AppBundle\Entity\BlogArticle
                form:
                    default: AppBundle\Form\BlogArticleType

Extend the bundle's model, add your columns (author, hero image, tags), and let Sylius' resource controllers/factories handle CRUD. This is the closest analogue to Laravel's "publish and override the config, don't fork the package" convention — and it is the only place you get leverage, because the vendor code is frozen.

Admin CRUD comes for free via the grid. Articles show up as a grid in the existing Sylius admin with the same filters/sorting/bulk actions as products. Register a custom grid if you need extra columns:

sylius_grid:
    grids:
        sylius_blogger_article:
            driver:
                name: doctrine/orm
                options:
                    class: "%sylius.model.article.class%"
            fields:
                title: { type: string, label: sylius.ui.title }
                state: { type: twig, options: { template: "@SyliusBlogger/Admin/Article/Grid/_state.html.twig" } }

Publishing states are the storefront gate. The bundle models draft/published state so unfinished posts stay out of the shop. The pattern to internalise: the storefront controller/repository query must filter on the published state, and the admin grid shows everything. When auditing an inherited app, verify that filter is actually applied on every storefront route — a mis-scoped query leaking drafts into /blog is a classic find.

Templates are overridable by bundle path. Copy the Twig template into your app under the same relative path (e.g. app/Resources/SyliusBloggerBundle/views/Article/index.html.twig) and edit in place — no config flag needed. This is how you make the blog match your theme. If you find yourself needing a new variable, you are extending a controller; do that in an app-level controller that extends the bundle's, not by touching vendor/.

Fixtures for seeding. The bundle ships fixture config so you can seed example posts (app/console sylius:fixtures:load). Use it to demo the content model to stakeholders; do not ship fixture content to production.

If you are actually on Laravel. Do not attempt to run this bundle. Treat it as a specification and port the shape:

  • articles table: id, slug (unique), title, content (longText), published_at (nullable), timestamps.
  • Article Eloquent model with scopePublished() → whereNotNull('published_at')->where('published_at', '<=', now()).
  • GET /blog and GET /blog/{article:slug} in a BlogController.
  • Rich text: sanitize on write (mews/purifier or an HTML sanitizer), never trust stored HTML on output.
  • Cache the index and detail responses (Cache::remember keyed on slug + updated_at) — a blog is read-heavy and cache-friendly.
  • Sitemap + <link rel="canonical"> from slug, and 301s if you migrate existing URLs.

Map the concepts one-to-one: resource config → model casts/$fillable; grid → Filament/Nova resource or a simple admin CRUD; form type → FormRequest + validation rules; fixtures → seeders; Twig override → Blade view override (php artisan vendor:publish-style).

Gotchas and Tips

  • Archived means no patches. No security fixes for the admin-facing rich-text input, no compatibility work when Sylius/Symfony/Doctrine move. If you keep it, fork it into an internal namespace with a named owner, or treat removal as planned debt reduction.
  • Doctrine/version drift is the failure mode, not bugs in the code. Expect the first break to appear as an upgrade-time test failure in resource config or a form type, then a runtime break in the admin grid. Pin aggressively and block host upgrades until the bundle is forked or removed.
  • doctrine:schema:update --force is a trap. This era of Sylius projects often has no proper migrations. Always --dump-sql first and convert to a migration by hand.
  • Config cache and grid cache will lie to you. After changing sylius_blogger: or sylius_grid: config, app/console cache:clear — in dev, rm -rf app/cache/* when things "make no sense."
  • Routing prefix collisions. If you mount at /blog and also have a BlogBundle or a manual /blog route, you get a silent last-one-wins depending on import order. app/console debug:router | grep blog will tell you.
  • Template override path is easy to get wrong. The directory must match the bundle's logical name (SyliusBloggerBundle), not the vendor folder path. If your override is ignored, check the folder name first.
  • Rich text is not sanitized by magic. The bundle stores whatever the WYSIWYG submits. Sanitize on output (Twig autoescape is not enough for |raw templates) and on input, and treat stored HTML as a trust boundary.
  • Slugs can collide across locales and can go stale when titles change. Decide whether slug is editable and add a unique index; plan redirects for any slug you allow to change.
  • No community to lean on. 13 stars, 0 dependents: no issue archaeology, no downstream forks hardened in production. Budget for debugging alone, and write down what you learn about the entity's editorial assumptions — the maintainers are gone.
  • Extension points are limited to config + template overrides + subclassing. If a requirement does not fall out of Configuration.php / Resources/config/ / Resources/views/, you are maintaining a fork. Price that into any "just one more feature" request.
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.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core