fix: add hashid to brand eager load and defensive fallback
- Add hashid to brand eager loading in ProductController - Add defensive fallback in Brand::getLogoUrl() and getBannerUrl() - Falls back to direct Storage URL if hashid is missing - Prevents route generation errors from incomplete eager loading
This commit is contained in:
@@ -1511,7 +1511,7 @@ function batchManager(config) {
|
||||
{{-- D. Audit / Subtle Stats (bottom metadata) --}}
|
||||
@if($product->exists)
|
||||
<div class="mt-6 text-sm text-base-content/60 space-y-1">
|
||||
<p><span class="font-medium">Created:</span> {{ $product->created_at->format('M d, Y g:i A') }} • <span class="font-medium">Updated:</span> {{ $product->updated_at->format('M d, Y g:i A') }}</p>
|
||||
<p><span class="font-medium">Created:</span> {{ $product->created_at?->format('M d, Y g:i A') ?? 'N/A' }} • <span class="font-medium">Updated:</span> {{ $product->updated_at?->format('M d, Y g:i A') ?? 'N/A' }}</p>
|
||||
<p>Cost: ${{ number_format($product->effective_cost_price, 2) }} • Wholesale: ${{ number_format($product->wholesale_price ?? 0, 2) }} • MSRP: ${{ number_format($product->msrp ?? 0, 2) }} • Margin: {{ number_format($product->calculateMargin(), 1) }}%</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user