getUrlCallback, reducing manual route() calls in models.optionsQuery, resolveQuery) to scope linkable models (e.g., "only published posts").LinkableConfig requires careful setup (e.g., routeName, optionLabel). Misconfigurations may break URL generation.laravel-translatable) may be needed.linkable pivot tables).resolveQuery to filter.)optionsQuery scans (e.g., published()) impact Nova field load times?Post, Product, Article).Post).$post->url()) and Nova field rendering.optionsQuery performance (e.g., published() filter).php artisan vendor:publish) for customization.belongsToMany relationships with Linkable where possible.getUrlCallback for domain-specific routes (e.g., /posts/{slug}).Linkable::make().optionSearch for discoverability (e.g., search by title or slug).resolveQuery (e.g., ->whereNotNull('deleted_at')).previewUrl() with tokens).setRouteCallback if using Spatie’s translatable or similar.post_linkables).hasManyThrough relationships).--tag=config).use Linkable to target models.linkableConfig() with routeName, optionLabel, etc.Linkable::make().optionsClasses to restrict link types.$model->url()).linkableConfig()).LinkableConfig settings may diverge across models.$post->url() returning null?").optionsQuery scans (e.g., published()) could slow down admin panels with large datasets. Mitigation: Add indexes to optionSearch columns (e.g., title, slug).getUrlCallback is called per-model; ensure it’s optimized (e.g., avoid N+1 queries).linkable tables. Mitigation: Use database indexes on source_id, target_id.attach()/detach() calls could corrupt pivot tables. Mitigation: Use database transactions.$model->url()) are likely cached by Laravel’s route system, but test under load.| Failure Scenario | Impact | Mitigation |
|---|---|---|
Misconfigured routeName |
Broken URLs ($post->url() returns null) |
Validate routes via Linkable::hasRoute() |
optionLabel returns null |
Nova field shows empty options | Default to id or toString() in config |
| Circular links (A→B→A) | Infinite loops in traversal | Add validation in linkableConfig |
| Deleted model referenced | Broken links in UI/API | Use resolveQuery to filter soft-deleted models |
High-cardinality optionsQuery |
Slow Nova field loading | Add indexes to search columns |
| AGPL license incompatibility | Legal blocker for proprietary code | Fork and relicense |
LinkableConfig and trait usage.routeName/routeParameterName for URL generation.optionLabel/optionSearch for Nova field behavior.resolveQuery for filtering linkable models.use Linkable to a model and testing $model->url().How can I help you explore Laravel packages today?