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

Banner Bundle Laravel Package

evercodelab/banner-bundle

A Symfony/PHP bundle for managing banners in your application, with CRUD administration, image uploads, ordering, and template helpers for rendering banners in your views. Integrates quickly via bundle configuration and Doctrine entities.

View on GitHub
Deep Wiki
Context7

Getting Started

Read this first: evercodelab/banner-bundle is a Symfony2 bundle (PHP 5.3–7.0 era, ~2014–2015), not a Laravel package. It ships no ServiceProvider, no composer.json extra.laravel, and no facades. Score 0 / 0 dependents confirms it is effectively unmaintained. Treat it as reference code to vendor or port, not a package you composer require into a modern Laravel app and expect to work.

Minimum viable path:

  1. composer require evercodelab/banner-bundle — expect resolver failures on Laravel 9+/PHP 8+. If it installs, pin it (--with-all-dependencies) and expect Doctrine 2.4–2.6 style constraints.
  2. Read Entity/Banner.php (or similarly named) and Resources/config/services.yml. Those two files tell you the schema and the intended extension points. Skip the docs — they are usually stale for Symfony2 bundles.
  3. In a Symfony app: register EvercodeLab\BannerBundle\BannerBundle in app/AppKernel.php, run doctrine:schema:update --force, configure the upload dir. In Laravel: extract the entity fields into a migration and skip the bundle's Doctrine wiring entirely.
  4. Build the first use case as a banner group/position → active banners ordered by sort query, seeded with two rows, rendered on the homepage. This is the only workflow the bundle reliably supports.

Implementation Patterns

  • Repository-first reads. Query banners by a position/group slug plus isActive = true, ordered by the bundle's sort column: Banner::where('position','homepage_top')->where('is_active',1)->orderBy('sort')->get(). Wrap in a BannerRepository so swapping storage later is one file.
  • Upload on save. The bundle likely moves files into a hardcoded web/uploads/... path via a listener. In Laravel, replace with an UploadedFile → Storage::disk('public')->put(...) step in a BannerService, and store the relative path on the row.
  • Render via a helper. The bundle exposes a Twig function (something like {{ banner('homepage_top') }}). Port it to a Blade component or @banner('homepage_top') directive that calls your repository. Return null/empty instead of throwing when a group has no banners.
  • Admin CRUD. It expects Sonata Admin / a Symfony admin generator. Rebuild with Filament or Nova — the form is just title, image, link, position, active, sort.
  • Cache aggressively. Banner queries run on every page render. Cache::remember("banners.{$position}", 300, fn () => ...) and forgot on save/delete.
  • Scheduled activation. If the schema has starts_at / ends_at, filter on it in the repository rather than in the view.

Gotchas and Tips

  • No Laravel auto-discovery. You will not get a service provider, publishable config, or migrations. Any php artisan vendor:publish command you see in a README is wrong for this package.
  • Doctrine vs Eloquent. Entities use @ORM\ annotations and assume Doctrine's EntityManager. Either bridge with laravel-doctrine, or — better for a banner table this small — re-create it as an Eloquent model and delete the bundle's ORM layer.
  • Filesystem paths are hardcoded. Expect web/uploads/banners or %kernel.root_dir%/../web/.... Rewrite to Laravel's public/ or storage/app/public and update the stored path column accordingly.
  • Symfony File vs Illuminate\Http\UploadedFile. The bundle's upload listener and validation will type-hint Symfony's File. Do not try to satisfy those signatures; replace the listener with your own upload step.
  • Doctrine DBAL constraints. Old doctrine/orm pins will conflict with Laravel's doctrine/dbal (used for column-change migrations). Isolate the bundle or vendor the code out of vendor/ and into app/.
  • Positions are free-form strings. There is no enum or constant list. Define your own BannerPosition enum/constants immediately, otherwise typos silently produce empty sections.
  • Locale/en hardcoding. Old bundles often hardcode 'en' in labels or date formatting — audit for setLocale-style calls before shipping multilingual.
  • No tests, no CI, 0 dependents. You are the maintainer now. If you go the vendor route, add at least one feature test around the read path and one around upload before production.
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.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums