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
Laravel Nova Contexts

Laravel Nova Contexts Laravel Package

novius/laravel-nova-contexts

Adds selectable contexts to Laravel Nova: define scopes such as sites, tenants, or locales, let users switch between them from the Nova UI, and automatically apply the matching global scopes to your resources and queries.

View on GitHub
Deep Wiki
Context7

Laravel Nova Contexts adds a flexible context system to Laravel Nova, letting you scope resources, queries and UI elements to the currently selected context—ideal for multi-site, multi-tenant or multi-store applications. A context switcher is exposed in the Nova interface so users can move between contexts without leaving the admin panel.

  • Context switcher integrated into the Nova UI
  • Scope Eloquent queries and resources per active context
  • Configurable context model, resolver and persistence
  • Works alongside Nova policies and existing resources
  • Simple publishing of config and migrations
Frequently asked questions about Laravel Nova Contexts
What does novius/laravel-nova-contexts do?
It is a Laravel Nova package for managing resource contexts. You define named scopes with their own fields, filters, and visibility rules, then switch between those contexts to tailor Nova resource views and forms. The goal is to avoid duplicating resource definitions when the same resource needs several presentations.
How do I install novius/laravel-nova-contexts in a Laravel Nova app?
Install it with Composer using the package name novius/laravel-nova-contexts. Laravel package discovery should register the service provider where applicable, but check the README for any publishable config or Nova-specific registration step. After installation, define your contexts and attach them to the relevant Nova resources.
Which Laravel and Nova versions are supported?
The supplied release note for 1.1.0 states Laravel 9 compatibility, but the provided context does not include a composer.json or a full support matrix. Before adopting, check the package constraints for illuminate/* and Nova, and confirm your exact Laravel and Nova versions. If you are on Laravel 10 or later, ask the maintainer for planned support rather than assuming it.
How do I define a context for a Nova resource?
Create a context definition that names the scope and lists its fields, filters, and visibility rules, then associate it with the Nova resource. The package is designed so those definitions are reusable rather than copied into each resource. The exact class names and registration syntax should be confirmed in the package README.
Can each context have its own fields and filters?
Yes. The package description says contexts are named scopes with their own fields, filters, and visibility rules. That lets one Nova resource expose different form fields or index filters depending on the selected context. Verify the available field and filter types against your Nova version before standardizing on it.
How do visibility rules work in Nova contexts?
Visibility rules are part of a context definition and determine when that context or its elements should appear. They are intended to tailor resource views and forms without duplicating the underlying resource code. Because the provided context does not include the rule syntax, confirm authorization and visibility behavior in the README and with a staging test.
Is novius/laravel-nova-contexts safe to use in production?
It is an admin-panel extension, so any runtime overhead applies to Nova requests rather than public front-end traffic. The main adoption risk is maintenance and version support, not expected high runtime cost. Test it against your Nova resources and authorization rules on staging, and review the release constraints before production use.
How should I test Nova resources that use contexts?
Use Laravel and Nova testing helpers to assert that the expected fields and filters appear for each context. Cover authorized and unauthorized users separately because visibility rules can change what a resource exposes. Also test switching contexts on index, detail, and form screens if your application relies on all three.
When should I use contexts instead of Nova filters or lenses?
Use contexts when several named scopes need to share a resource while varying fields, filters, and visibility rules. Built-in Nova filters, lenses, and conditional fields may be enough for simpler cases. Contexts are most useful when duplicating resource definitions would otherwise become the maintenance burden.
What changed in version 1.1.0 and is the package actively maintained?
The only supplied release evidence is a 1.1.0 note claiming Laravel 9 compatibility; there is no changelog, issue history, or CI matrix in the provided context. Check whether the illuminate/* constraints were widened to allow older and newer Laravel versions or replaced in a breaking way under a minor release. Ask the maintainer about release cadence, Laravel 10/11/12 plans, and ownership before relying on it long term.
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.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections