brandonjbegle/nova-4-slack-channel-field
A Laravel Nova 4 field for selecting Slack channels in your admin panels. It provides a searchable channel picker backed by the Slack API, letting you store the chosen channel ID on your models for notifications or integrations.
This release is a Nova 5 compatibility drop. Treat it as a fresh install rather than an in-place bump — there is no prior assessment to diff against, and Nova 5 itself is a major version, so the package's own v1.0.0 is effectively the first stable line for that Nova generation.
Minimal path:
composer show laravel/nova), plus the Laravel/PHP versions Nova 5 requires. If you are still on Nova 4, do not install this — pin the previous package line instead.composer require <vendor>/<package>:^1.0 (Nova is a private package, so your nova.laravel.com Composer credentials must be configured on every machine and in CI).php artisan vendor:publish --provider="Vendor\Package\ToolServiceProvider" --tag=package-config
php artisan vendor:publish --provider="Vendor\Package\ToolServiceProvider" --tag=package-assets
app/Providers/NovaServiceProvider.php — the method depends on what the package ships:
public function tools(): array
{
return [
new \Vendor\Package\PackageTool(),
];
}
Cards go in cards(), custom fields in the fields() method of a Resource, filters in filters().Where to look first: the package's src/ for the registered Tool/Card/Field class and its canSee/authorize methods, then its resources/js (or dist/) to confirm compiled assets are committed. Read the package's own upgrade note for Nova 5 before anything else — that is the only changelog signal you have for this release.
First use case: add it as a dashboard card or a tool in the sidebar, hit /nova, and confirm it renders before wiring it into Resources. That isolates asset/registration failures from field-level failures.
tools(), a cards() entry is more common for dashboard widgets.public function cards(): array
{
return [
(new \Vendor\Package\MetricCard())->width('1/2')->refreshWhenActionRuns(),
];
}
Keep app-specific values (API keys, model classes, thresholds) in config/ and resolve them in the package's service provider rather than passing raw values around the dashboard.canSee(Request $request) for UI-level hiding and authorize(Request $request) for hard enforcement. Pattern: admin-only metrics via canSee, data-scoped queries via policy checks inside the card's calculate().public function fields(NovaRequest $request): array
{
return [
\Vendor\Package\PackageField::make('Setting')
->rules('required', 'max:255')
->onlyOnForms(),
];
}
Always test resolve() (index/detail) and fill() (create/update) separately — Nova 5 render changes tend to break the display path first.npm ci && npm run prod in the package directory, or its nova:install equivalent), then republish assets. Commit or re-publish dist/ after every change or Nova will serve stale JS.Nova::actingAs(), Nova::json()/Nova::get()) to assert the tool/card appears for the right users and is absent for others. A cheap regression suite here pays for itself across future Nova bumps.^1.0 and let a path repository point at a checkout during development; Nova packages go stale fast because the ecosystem's floor moves with each Nova major.composer.json for "laravel/nova": "^5.0" and a conflict/provide block before upgrading an existing app. There is no graceful coexistence — you upgrade Nova and the package together.Nova::script(..., $version) call. If the package hardcodes a version, bumping it yourself after local asset changes is the only way to beat browser caching.laravel/nova from nova.laravel.com; a fresh CI runner without credentials fails at composer install with a confusing 401. Verify the auth config before debugging the package.canSee is not security. Both canSee and authorize are UI gates by default. If the card/field exposes data through a JSON endpoint, enforce the same policy in the controller — Nova's endpoint is routable by anyone with a session.php artisan nova:publish vs vendor:publish. The package's own tags may be missed if you only run the Nova command. Run both, and re-run after upgrades.Nova::script()/Nova::style() for asset injection, the package's Tool boot()/renderNavigation() methods for menu customization, and Nova::resources()/resourcesIn() for auto-discovery — the last one can silently hide registered resources if a namespace is wrong.^1.0 for libraries, 1.0.* for production apps you don't test continuously, and keep an eye on the package's Nova 5 issues as other users shake out the bump.How can I help you explore Laravel packages today?