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

Baum Laravel Package

vishalmandora/baum

Baum is a Laravel package for managing hierarchical tree data in Eloquent models, offering helpers for ancestors, descendants, and ordered nested structures. Ideal for categories, menus, and org charts, with a lightweight, easy-to-integrate design.

View on GitHub
Deep Wiki
Context7

Getting Started

  1. Require the package with Composer and let Laravel's package auto-discovery register its service provider (or add it manually to config/app.php if you're on an older skeleton).
  2. Check the package's composer.json constraints against your Laravel version. This 5.8 release specifically targets Laravel 5.8 event-firing compatibility, so confirm you are on laravel/framework:^5.8 if you need the fix.
  3. Publish any package config with php artisan vendor:publish if the README calls for it, then review the published file for event names, listener mappings, or queue settings.
  4. First use case: fire a package event from a controller or model observer and verify a listener receives it. Start by reading the package's event classes and service provider to see what is dispatched and when.

Minimal smoke test:

Event::fake();

// Trigger the package action that should fire the event
$package->doSomething();

Event::assertDispatched(\Vendor\Package\Events\SomethingHappened::class);

If that assertion passes, the package is wired correctly for your app.

Implementation Patterns

  • Dispatch through the package's public API, not raw Event::fire(). The 5.8 fix confirms the package now uses the modern dispatch path. Treat Event::fire() as deprecated in your own code as well; use Event::dispatch() or the event() helper.
  • Register listeners in EventServiceProvider. Map the package's event classes to your listeners in $listen, then run php artisan event:clear if you cache events.
  • Keep listeners small and queued where appropriate. If the package event carries Eloquent models or large payloads, implement ShouldQueue on listeners and ensure a queue worker is running.
  • Use model observers for domain events. If the package fires events around model lifecycle, combine it with observers so your app reacts consistently whether changes come from HTTP, commands, or jobs.
  • Test with Event::fake() at the boundary. Fake events before invoking the package action, assert dispatch, and test listener behavior separately by calling the listener directly or using Event::fake() selectively.
  • Integrate with transactions carefully. If the package fires events inside a database transaction, queue the listener or use DB::afterCommit() so downstream work does not run before the transaction commits.

Gotchas and Tips

  • Laravel 5.8 deprecated Event::fire() in favor of Event::dispatch(). The release note ("Solved even fire issue for laravel 5.8") almost certainly refers to this. If you are pinned to an older package version, upgrade to this release before debugging missing events on Laravel 5.8.
  • Verify your Laravel version before upgrading. A fix targeted at 5.8 may drop support for older framework versions. Check composer.json constraints and run the test suite after updating.
  • Clear cached events after listener changes. Laravel 5.8 supports event caching; stale caches are a common reason listeners appear not to fire.
  • Debug missing events in this order: confirm the package action actually executes, confirm the event class is dispatched with Event::fake(), confirm the listener is registered, then confirm the queue worker is running if the listener is queued.
  • Watch for naming differences. The release note typo ("even fire") is a reminder to read the package's changelog and event class names carefully; do not assume the event name matches the action name.
  • Extension points: prefer custom listeners and event subscribers over editing vendor code. If the package exposes config for listener mappings or event names, use it rather than forking.
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