Blog

Posts in Best Practices · All posts

Best Practices

Designing AI-friendly import flows in Laravel

Developers are asking how to trigger imports from scripts and feed CSV data through APIs. Here's how to design import flows that work for both humans and machines.

Best Practices

CSV import lifecycle hooks: running custom logic before, during, and after import

Six lifecycle hooks let you inject custom logic at every stage of an import -- from preparing caches to setting owners to sending notifications.

Best Practices

CSV import error recovery: from silent failures to user-friendly correction

The spectrum from silent failure to inline correction. Here's how to store, display, and resolve import errors without losing data.

Best Practices

The match-or-create pattern: linking CSV data to existing records

Three behaviors for handling CSV references to existing data: match only, match or create, and always create. Here's when to use each.

Best Practices

Intra-import deduplication: preventing duplicate records during CSV import

500 rows reference 'Acme Corp'. Without deduplication, you get 500 company records. Here's the normalized-key cache pattern that prevents it.

Best Practices

The hidden cost of building your own CSV importer

That two-day CSV import task? It always becomes two months. Here's the iceberg of complexity hiding beneath the upload button.

Best Practices

CSV column mapping UX patterns that reduce support tickets

Every user's CSV is different. Smart column mapping -- with auto-detection, preview values, and entity link mapping -- keeps imports flowing without support tickets.

Best Practices

Handling CSV validation errors before they hit your database

Stop rejecting, logging, or silently skipping bad CSV rows. The validate-and-correct pattern lets users fix errors inline before import.