File tree 1 file changed +10
-5
lines changed
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 372
372
<x-adminlte-card title =" {{ __ (' general_content.latest_products_trans_key' ) } }" theme =" dark" icon =" fas fa-chart-bar text-white" collapsible removable maximizable >
373
373
<div class =" row" >
374
374
@forelse ($LastProducts as $LastProduct )
375
+ @php
376
+ if ($LastProduct -> picture )
377
+ $picture = asset (' /images/products/' . $LastProduct -> picture );
378
+ else {
379
+ $picture = Avatar:: create ($LastProduct -> code )-> toBase64 ();
380
+ }
381
+ @endphp
375
382
<div class =" col-md-2" >
376
- @if ($LastProduct -> picture )
377
383
<x-adminlte-profile-widget name =" {{ $LastProduct -> label } } {{ $LastProduct -> ind } }" desc =" {{ $LastProduct -> family -> label } }" theme =" lightblue"
378
- img =" {{ asset (' /images/products/' . $LastProduct -> picture ) } }" layout-type =" classic" >
379
- @endif
384
+ img =" {{ $picture } }"
385
+ layout-type =" classic" >
386
+
380
387
<x-adminlte-profile-row-item icon =" fas fa-cash-register " title =" {{ __ (' general_content.purchased_price_trans_key' ) } }" text =" {{ $LastProduct -> purchased_price } } {{ $Factory -> curency } }"
381
388
url =" #" badge =" teal" />
382
389
<x-adminlte-profile-row-item icon =" fas fa-shopping-cart" title =" {{ __ (' general_content.price_trans_key' ) } }"
383
390
text =" {{ $LastProduct -> selling_price } } {{ $Factory -> curency } }" url =" #" badge =" lightblue" />
384
391
</x-adminlte-profile-widget >
385
-
386
-
387
392
</div >
388
393
<!-- /.item -->
389
394
@empty
You can’t perform that action at this time.
0 commit comments