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

Horizon Link Laravel Package

alexpgates/horizon-link

A lightweight Laravel package that provides convenient links to your Laravel Horizon queue dashboard, making it quick to jump from your application to Horizon to monitor queues, jobs, and workers. Simple to install and configure.

View on GitHub
Deep Wiki
Context7

Getting Started

  • What it is: a tiny Laravel Nova tool that drops a nav item/link into the Nova sidebar pointing at Laravel Horizon (/horizon). That's essentially the whole feature surface — treat it as a shortcut, not a framework.
  • Prerequisites: a working Laravel app with Laravel Horizon configured and running, plus a licensed Laravel Nova install (Nova is a private Composer package, so you need Nova credentials in auth.json).
  • Install:
    composer require alexpgates/horizon-link
    
  • Register the tool in app/Providers/NovaServiceProvider.php inside tools():
    use Alexpgates\HorizonLink\HorizonLink;
    
    public function tools()
    {
        return [
            new HorizonLink(),
        ];
    }
    
  • Where to look first:
    1. composer.json — confirm the autoload namespace (it may differ from the package name) and the laravel/nova version constraint, which tells you what Nova era it targets.
    2. src/ — the Tool class; this is where the label, icon, and target URL live.
    3. resources/js/tool.js + dist/ — whether it ships a Vue component or just a menu entry.
  • First use case: log into Nova, confirm a new sidebar entry appears, and click it to land on the Horizon dashboard. Verify it works in the environment where Horizon actually runs (often only production/staging).

Implementation Patterns

  • Standard registration pattern: add the tool once in NovaServiceProvider::tools(). If it extends Laravel\Nova\Tool, it will render via Nova's tool/menu system; if it's a card, it belongs in cards() instead — check the class before registering.
  • Conditional visibility: expose it only where Horizon is available:
    public function tools()
    {
        return array_filter([
            app()->environment('production') ? new HorizonLink() : null,
        ]);
    }
    
    Or, if the tool supports canSee, gate it on the same policy you use for Horizon:
    (new HorizonLink())->canSee(fn ($request) => $request->user()->isAdmin())
    
  • Pair with Horizon::auth(): the link is cosmetic; the destination should still be protected by Horizon's gate in HorizonServiceProvider. Keep the two in sync so users don't see a link to a 403.
  • Multi-environment / subdomain setups: if Horizon is served from a separate host (e.g. horizon.example.com), confirm whether the tool hardcodes /horizon or reads a config/URL helper. Hardcoded paths are the usual failure mode; fork or wrap if you need a configurable base.
  • Integration tips:
    • Keep Nova and Horizon on the same app instance where possible so the relative path resolves.
    • If you need more than a link (metrics, job counts, recent failures), this package won't do it — pair it with a dedicated Horizon dashboard card or build a small custom tool.
    • Because the surface is so small, a fallback integration is trivial. In Nova 4+, a native menu link is roughly:
      // NovaServiceProvider::boot() or mainMenu()
      MenuItem::link('Horizon', '/horizon')->icon('lightning-bolt');
      
      Use the package only if you prefer the one-line tool registration.

Gotchas and Tips

  • Maintenance risk: last release Feb 2020, 5 stars, 0 dependents. Nova's tool/menu API changed substantially in Nova 4 — an old Tool may still register but render with broken styles, a missing icon, or no sidebar item at all. Test on your exact Nova version before committing.
  • Nova 4/5 compatibility: if the item doesn't show, check whether the tool uses the legacy tool menu (renderNavigation) versus the newer MenuItem API. You may need to fork the single class and port it.
  • Hardcoded URL: small packages of this vintage usually hardcode /horizon. If you set a custom HORIZON_PATH, run Horizon behind a subdomain, or use path prefixes, the link will 404. Inspect src/ and override the target if needed.
  • Assets/build quirks: pre-2020 tools ship a precompiled dist/js/tool.js. If Nova's asset pipeline changed, the component can render blank — open the browser console and look for missing chunks before blaming config.
  • Composer resolution failures: if composer require fails, it's usually the laravel/nova constraint or missing Nova credentials, not this package. Check composer why-not laravel/nova and your auth.json.
  • Caching/debugging checklist when the link is missing:
    composer dump-autoload
    php artisan nova:publish
    php artisan optimize clears   # or config:clear / view:clear
    
    Then confirm NovaServiceProvider::tools() returns the instance and check nova-components asset publishing in config/nova.php.
  • Extension points are minimal: expect no config file and no events. Your real extension points are (a) subclassing the Tool and overriding its label/URL, or (b) dropping the package and adding a MenuItem/Link yourself — a few lines you fully control, with no abandoned dependency to carry.
  • Recommendation: acceptable as a zero-effort sidebar link on an existing Nova 3 app. For new projects or Nova 4+, prefer a native menu entry; the package's value proposition (one line saved) is outweighed by its staleness.
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.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource