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 Csv Import Laravel Package

martiallabs/laravel-nova-csv-import

View on GitHub
Deep Wiki
Context7

Getting Started

  • Install with composer require <vendor>/<package> and publish the config (php artisan vendor:publish --tag=...) before writing any import code — the defaults now matter much more than they did pre-1.0.
  • Read the 1.0.0 release note before anything else. "Reversed the logic of resource imports" is a semantic inversion, not a cosmetic refactor: whatever your mental model of opt-in vs. opt-out was, assume it is now the opposite. Check the changelog/UPGRADE file and the config file's comments side by side.
  • Look first at the package's service provider (to see what gets bound/registered by default) and its config file (to see which resources are implicitly in or out of scope).
  • First use case: register a single resource import, run it, and verify what the package actually imported versus what it silently skipped. Do this on a throwaway resource before touching anything real — the reversed logic is easiest to observe on a trivial case.

Implementation Patterns

  • Start from an explicit, exhaustive import list. Because the filter logic is now inverted, implicit behaviour is the enemy. Enumerate the resources you want imported rather than relying on the package's defaults to select them for you.
  • Wrap the upgrade in a characterisation test. Before bumping to 1.0.0, snapshot the set of resources imported on a representative dataset. After the bump, assert the same set. Any diff is the inversion showing up in your app.
  • Treat an import as an idempotent command. Run it from a queued job or an artisan command that can be safely re-executed; the reversed selection logic means a re-run may now touch a different set of resources than the first run did, so make the operation repeatable rather than one-shot.
  • Isolate the import definition from the trigger. Keep resource selection in config/a dedicated class and the execution in a job or command. That way, when the filter semantics shift again (or when you need environment-specific selection), you change one file.
  • Migrate in two steps when upgrading an existing app:
    1. Pin the new version, run imports in a dry-run/log-only mode if the package supports it, and diff the selected resource set.
    2. Flip your own config/code to match the new semantics, then run for real.
  • Test at the boundary. Assertions on "which resources were selected" are cheap and catch inversion regressions; assertions on the fully imported end state are expensive and flaky. Prefer the former in CI, the latter in a nightly job.
  • Integration tip: if the package dispatches events around imports, hook those rather than polling the database — it gives you a clean seam for metrics, alerting, and post-import cache invalidation.

Gotchas and Tips

  • The headline pitfall is the inversion itself. Code that "worked" on 0.x and suddenly imports nothing (or everything) is not a bug report — it's the release note. Grep your codebase for any place you build the resource list, and check whether that list was written against the old semantics.
  • Silent no-ops are the likely failure mode. A reversed filter usually fails closed and quietly: no exception, no log line, just fewer resources. Add an assertion or log statement on the resolved import set so an empty result is loud.
  • Version-pin during rollout. "vendor/package": "1.0.*" (not ^1.0) until you've confirmed behaviour in staging; the release is a major for a reason.
  • Config caching bites. If you changed the config file, run php artisan config:clear — a stale cached config is a very common explanation for "the inversion didn't take effect."
  • Debugging recipe: dump the resolved list of resources immediately before the import executes (via dd(), a log line, or a temporary event listener), compare against your expectation, and inspect the config value that governs inclusion/exclusion. Nine times out of ten the answer is there.
  • Extension points to prefer over core edits: custom resolvers/selection callbacks, macros, and package-dispatched events. If the package doesn't expose a seam for the selection logic, that's worth raising upstream — the 1.0.0 change makes the selection step the most volatile part of the surface area.
  • Document the semantics in your own repo. A one-paragraph note in your team wiki stating "as of 1.0.0, resources are included by default / included only when listed" will save the next developer (or future you) an afternoon.
  • Watch for the 1.0.x patch releases. A major release that inverts selection logic frequently ships a 1.0.1 or 1.0.2 correcting edge cases in the new behaviour; check those notes before concluding the reversal is final in its details.
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.
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
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console